现象:
SpringCloud跨服务调用接口时遇到:
feign.RetryableException: Read timed out executing POST XXX :
at feign.FeignException.errorExecuting(FeignException.java:213)
at feign.FeignException.errorExecuting(FeignException.java:213)
Caused by: java.net.SocketTimeoutException: Read timed out
出现频率:查看日志发现不会每天都出现这个异常,但是一报就会一直出现 (以下是12.01-12.21出现频率)
2021-12-01.0.log (匹配842次)
2021-12-02.0.log (匹配772次)
2021-12-03.0.log (匹配714次)
2021-12-04.0.log (匹配506次)
当前配置:
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
thread:
timeoutInMilliseconds: 310000
ribbon:
ReadTimeout: 120000
ConnectTimeout: 10000
有没有检查一下内存,会不会内存不足,或者网络不稳定等原因呢?
feign的超时时间也设置下,如果这都超时了,就去看看被调用方,是不是那边出了问题导致客户端超时
这个超时时间也过于长了吧。。
最主要是要查看日志里吧 这些调用超时是对应的某几个接口还是所有接口
如果是一段时间内所有接口估计是网络或者是内存问题 如果是其中某几个接口大概率是因为接口问题