spring cloud中解决Fegion第一次请求timeout的问题
三种解决方案:
1)延长hystix的连接超时时间,默认时间是1秒
//在Fegion服务的application配置文件中添加一下配置:
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds:5000
2)禁用hystix的超时时间
//在Fegion服务的application配置文件中添加一下配置:
hystrix.command.default.execution.timeout.enabled: false
3)直接禁用hystix
//在Fegion服务的application配置文件添加如下配置信息:
feign.hystrix.enabled: false