异常提示
2020-08-06 21:42:57.779 ERROR 20088 --- [io-18085-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet] :
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
[Request processing failed; nested exception is com.netflix.hystrix.exception.HystrixRuntimeException:
SkuFeign#findList(Sku) timed-out and no fallback available.] with root cause
原因:
Hystrix缺省超时判断为1秒钟,由于网络问题,有些请求超过1秒钟之后才接收到。
解决:
配置修改请求超时时长(application.yml):
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 30000 #缺省为1000
application.properties 文件
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=30000