The provider call timed out in dubbo

异常如下:"Failed to invoke the method doSaveCityMonthData in the service com.gefang.provider.dapa.service.IAppUsedService. Tried 3 times of the providers [192.168.195.1:8085] (1/1) from the registry 192.168.0.210:8082 on the consumer 192.168.195.1 using the dubbo version 2.5.7. Last error is: Invoke remote method timeout. method: doSaveCityMonthData, provider: dubbo://192.168.195.1:8085/com.gefang.provider.dapa.service.IAppUsedService?anyhost=true&application=consumer-dapa&check=false&dubbo=2.5.7&generic=false&interface=com.gefang.provider.dapa.service.IAppUsedService&methods=saveAppUsedInfoProjectOriginalMonth,getUnComputeCityMonthData,getAztaskAppUsedInfo,updateAppUsedInfoProjectMonth,getAztaksAppUsedInfoSub,saveAppUsedInfoProjectMonth,getProjectSubUsedInfoMonth,getAppUsedInfo,setCityMonthCompute,getLastestCityMonthData,getUnComputeProjectData,doSaveCityMonthData,doSaveAzTaskAppUsedInfoCity,setProjectMonthCompute,getProjectUsedInfoMonth,saveAppUsedInfoCityMonth,saveAzTaskAppUsedInfoCity&pid=4296®ister.ip=192.168.195.1&remote.timestamp=1515388768873&revision=1.0.0-SNAPSHOT&side=consumer&timeout=6000×tamp=1515389242018, cause: Waiting server-side response timeout. start time: 2018-01-08 13:27:54.973, end time: 2018-01-08 13:28:00.980, client elapsed: 5 ms, server elapsed: 6002 ms, timeout: 6000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=doSaveCityMonthData, parameterTypes=[class java.lang.String], arguments=[201712], attachments={path=com.gefang.provider.dapa.service.IAppUsedService, interface=com.gefang.provider.dapa.service.IAppUsedService, version=0.0.0,timeout=6000}]], channel: /192.168.195.1:54113 -> /192.168.195.1:8085"


Distributed rookie, when I first encountered this problem, I saw a timeout, and there were   Tried 3 times of the providers who didn't know what was going on. The way to deal with the problem is to log the exception. Found the reason. When the provider calls the method, there is a timeout setting (for each Service), if it times out, it will re-initiate, which will be done three times. If it times out the third time, an exception will be thrown. Adjust the time of the service corresponding to the exception to a longer time. This setting is generally set here in the provider.xml exposing the zookeeper registry.

<dubbo:service interface="AdService" ref="adService" timeout="6000"/>

Increase the timeout a little, if you don't consider other things, just add two 00. ten minutes. enough. ok, solve the problem


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325648254&siteId=291194637