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时间变大, 重新发布消费端。 解决问题。

展开阅读全文

没有更多推荐了,返回首页