Skip to content

[BUG] 下载平台证书时遇到网络问题阻塞,导致大量线程等待 #210

@dyjxg4xygary

Description

@dyjxg4xygary

报错:
EXCEPTION:com.alibaba.dubbo.rpc.RpcException: cause: Server side(x.x.x.x:20880) threadpool is exhausted ,detail msg:Thread pool is EXHAUSTED! Thread Name: DubboServerHandler-x.x.x.x:20880, Pool Size: 300 (active: 300, core: 300, max: 300, largest: 300), Task: 365257 (completed: 364957), Executor status:(isShutdown:false, isTerminated:false, isTerminating:false), in dubbo://x.x.x.x:20880!
重现步骤:
1,下载平台证书时,网络出现问题,导致线程卡在网络请求
2,发起其他业务请求,超过一定数量
3,线程池满报错
原因:
CertificatesManager 有synchronized锁,
downloadAndUpdateCert方法的http请求卡住之后,putMerchant方法会阻塞
下载平台证书的时候需要设置超时时间,防止线程死掉.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions