这个看源码就能看的很明白,这个警告是这个意思,当断路器(Hystrix)设置的超时时间,要比Ribbon设置的超时时间长的时候
就会报这个错误.
大家的实际在初次使用spring-cloud的gateway的时候,肯定会被里面各种的Timeout搞得晕头转向。hytrix有设置,ribbon也有。我们一开始也是乱设一桶,Github上各种项目里也没几个设置正确的。对Timeout的研究源于一次log中的warning
The Hystrix timeout of 60000 ms for the command “foo” is set lower than the combination of the Ribbon read and connect timeout, 200000ms.
hytrix超时时间
log出自AbstractRibbonCommand.java,那么索性研究一下源码。
假设:
- 这里gateway会请求一个serviceName=foo的服务
<