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
  • 相关阅读:
    利用EZMorph复制bean
    JAVA中使用FTPClient上传下载
    戏说java web开发中的listener和filter
    FastCGI的并发处理
    XPATH学习总结
    [Linux] gdb crash之后,杀掉僵尸进程的办法
    JAVA反射使用手记
    在centos5下安装配置VNC
    开始FastCGI
    log4php配置文件实例
  • 原文地址:https://www.cnblogs.com/zhi-leaf/p/12125392.html
Copyright © 2011-2022 走看看