码迷,mamicode.com
首页 > 编程语言 > 详细

spring cloud:Edgware.RELEASE版本hystrix超时新坑

时间:2017-12-24 13:47:21      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:man   ase   soc   ring   read   参考   blank   log   and   

升级到Edgware.RELEASE发现,zuul中不管如何设置hystrix的超时时间均不起作用,仍然是默认的1000ms.  降回低版本后正常,但是低版本的fallback方法中,又拿不到详细异常信息,最终暂时在Edgware.RELEASE中,将hystrix的超时关掉,参考以下配置:

ribbon:
  ReadTimeout: 5000
  ConnectTimeout: 5000
  MaxAutoRetries: 0
  MaxAutoRetriesNextServer: 1

hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: false #Edgware.RELEASE中,timeoutInMilliseconds不起作用,暂时关掉
        isolation:
          thread:
            timeoutInMilliseconds: 10000

zuul:
  host:
    socket-timeout-millis: 10000
    connect-timeout-millis: 10000

希望下个版本中,能尽快修复该问题。

 

参考文章:

1、hystrix 官方配置:https://github.com/Netflix/Hystrix/wiki/Configuration#execution.isolation.strategy

2、周立的spring-cloud超时总结:http://www.itmuch.com/spring-cloud-sum/spring-cloud-timeout/ 

spring cloud:Edgware.RELEASE版本hystrix超时新坑

标签:man   ase   soc   ring   read   参考   blank   log   and   

原文地址:http://www.cnblogs.com/yjmyzz/p/8097713.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!