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 [] (1/1) from the registry on the consumer using the dubbo version 2.8.4a. Last error is: Invoke remote method timeout. method: getQyhx, provider: dubbo://, 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: / -> /


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

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