DUBBO timeout 请求超时问题

线上问题

同样的处理, 请求A,B,C都没问题, 只有C有问题,线上报以下错误,分析之后是因为dubbo 超时的问题,因为请求C的后台逻辑比较复杂,dubbo的消费端<dubbo:consumer timeout="5000" check="false"/>设置的超时时间太短的原因造成。

Failed to invoke the method getQyhx in the service com.zstimes.fpfx2.service.IFpfxOuterService.

Tried 3 times of the providers [192.168.100.57:20881] (1/1) from the registry 192.168.100.57:2181 on the consumer 192.168.100.74 using the dubbo version 2.8.4a. Last error is: Invoke remote method timeout. method: getQyhx, provider: dubbo://192.168.100.57:20881/com.zstimes.fpfx2.service.IFpfxOuterService?anyhost=true&application=zscloudweb-consumer&check=false&default.check=false&default.timeout=5000&dispatcher=all&dubbo=2.8.4a&generic=false&interface=com.zstimes.fpfx2.service.IFpfxOuterService&loadbalance=leastactive&methods=getQyhx&owner=zstimes&pid=8632&revision=1.0.0.10&side=consumer&timestamp=1528255020373&version=1.0.0, cause: Waiting server-side response timeout. start time: 2018-06-06 11:21:37.971, end time: 2018-06-06 11:21:42.978, client elapsed: 3 ms, server elapsed: 5001 ms, timeout: 5000 ms, request: Request [id=42, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=getQyhx, parameterTypes=[class java.lang.String], arguments=[913204117724751963], attachments={path=com.zstimes.fpfx2.service.IFpfxOuterService, interface=com.zstimes.fpfx2.service.IFpfxOuterService, version=1.0.0, timeout=5000}]], channel: /192.168.100.74:60096 -> /192.168.100.57:20881


解决:

<dubbo:consumer timeout="20000" check="false"/>

dubbo的消费者配置问题件中 把timeout时间变大, 重新发布消费端。 解决问题。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值