SpringCloud:Feign调用超时解决方案

版权声明:更多信息请关注 wwws.shinians.com 官网 https://blog.csdn.net/zzhuan_1/article/details/83856011

                                             解决消费者调用超时报错的问题(调试的时候 用的到)

线上环境酌情处理配置

共三种方案:可选其中一种应用

1、修改超时时间

hystrix:
  command:
      default:
        execution:
          isolation:
            thread:
              timeoutInMilliseconds: 5000


2、把超时发生异常属性关闭

hystrix:
  command:
      default:
        execution:
          timeout:
            enabled: false


3、禁用feign的hystrix


feign:
  hystrix:
    enabled: false

猜你喜欢

转载自blog.csdn.net/zzhuan_1/article/details/83856011