zoukankan      html  css  js  c++  java
  • The Hystrix timeout of 2000ms for the command xxx is set lower than the combination of the Ribbon read and connect timeout, 4000ms.

    该警告是在org.springframework.cloud.netflix.zuul.filters.route.support.AbstractRibbonCommand类的getHystrixTimeout方法中输出的,意思是断路器(Hystrix)设置的超时时间要比Ribbon设置的超时时间短。

    hystrix超时设置:

    hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds = 6000  # 默认超时时间
    hystrix.command.xxx.execution.isolation.thread.timeoutInMilliseconds = 6000      # 具体应用的超时时间

    ribbon超时时间计算:ribbonTimeout = (ribbonReadTimeout + ribbonConnectTimeout) * (maxAutoRetries + 1) * (maxAutoRetriesNextServer + 1)

    ribbon全局设置,超时时间:(2000+1000)*(0+1)*(1+1)=6000:

    ribbon.ReadTimeout = 2000            # 访问超时,单位毫秒,默认1000
    ribbon.ConnectTimeout = 1000         # 连接超时,单位毫秒,默认1000
    ribbon.MaxAutoRetries = 0            # 最大重试次数,默认0
    ribbon.MaxAutoRetriesNextServer = 1  # 最大重试服务个数,默认1

    ribbon针对具体服务设置,超时时间:(3000+1000)*(0+1)*(0+1)=4000:

    zk-provider.ribbon.ReadTimeout = 3000
    zk-provider.ribbon.ConnectTimeout = 1000
    zk-provider.ribbon.MaxAutoRetries = 0
    zk-provider.ribbon.MaxAutoRetriesNextServer = 0
  • 相关阅读:
    美国商业经济金融发展史
    英国商业经济金融发展史
    NIO入门
    eclipse的debug
    一些待深入的问题
    Django REST Framework(一) Serializer和ModelSerializer
    同步/异步/阻塞/非阻塞/BIO/NIO/AIO各种情况介绍
    为了后端掌握的粗浅前端
    前后端分离之JWT用户认证
    Redis
  • 原文地址:https://www.cnblogs.com/zhi-leaf/p/12125392.html
Copyright © 2011-2022 走看看