spring cloud中解决Fegion第一次请求timeout的问题

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

猜你喜欢

转载自blog.csdn.net/weixin_42914675/article/details/84070373