The Hystrix timeout of 60000ms for the command service-basic is set lower than the combination of th

The Hystrix timeout of 60000ms for the command service-basic is set lower than the combination of the Ribbon read and connect timeout, 240000ms。

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000
#请求处理的超时时间,单位为毫秒
ribbon.ReadTimeout=60000
#请求连接的超时时间,单位为毫秒
ribbon.ConnectTimeout=60000
#对当前实例的重试次数,默认为0
ribbon.MaxAutoRetries=0
#切换实例的重试次数,默认为0
ribbon.MaxAutoRetriesNextServer=1

 

我原本的配置为:

这句话的意思是:你熔断器(Hystrix )的时间小于,负载均衡(Ribbon )的超时时间了

具体的超时时间排序应该为:

具体服务的hytrix超时时间 > 默认的hytrix超时时间 > ribbon超时时间

其中ribbon的计算方法为:

ribbonTimeout = (60000 + 60000) * (0 + 1) * (1 + 1) = 240000

所以如果默认的或者具体服务的hytrix超时时间小于ribbon超时时间就会警告

将Hystrix超时时间设置超过240000即可。

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=1800000
#请求处理的超时时间,单位为毫秒
ribbon.ReadTimeout=60000
#请求连接的超时时间,单位为毫秒
ribbon.ConnectTimeout=60000
#对当前实例的重试次数,默认为0
ribbon.MaxAutoRetries=0
#切换实例的重试次数,默认为0
ribbon.MaxAutoRetriesNextServer=1

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值