zoukankan      html  css  js  c++  java
  • com.netflix.zuul.exception.ZuulException: Hystrix Readed time out

      通过API网关路由来访问用户服务,zuul默认路由规则 :http://zuul的Host地址:zuul端口/要调用的服务名/服务方法地址

      浏览器中打开http://127.0.0.1:8000/wallet/system/hello/1
      报错:
      This application has no explicit mapping for /error, so you are seeing this as a fallback.
      Tue Aug 07 17:49:01 CST 2018
      There was an unexpected error (type=Gateway Timeout, status=504).
      com.netflix.zuul.exception.ZuulException: Hystrix Readed time out

    这个错误是应为zuul的默认超时时间比较小,我们配置下zuul的超时时间,因zuul启用了ribbon的负载均衡,还需要设置ribbon的超时时间,注意ribbon的超时时间要小于zuul超时时间 。

    zuul:
      host:
        connect-timeout-millis: 15000 #HTTP连接超时要比Hystrix的大
        socket-timeout-millis: 60000   #socket超时
    ribbon:
      ReadTimeout: 10000
      ConnectTimeout: 10000
    

      

    qq群:216868740

  • 相关阅读:
    Codeforces 878A
    Codeforces 873B-Balanced Substring
    codeforces 868C
    51nod 1402 最大值(贪心)
    最小正子段和 贪心
    codeforces 819B
    Codeforces 785D
    Codeforces 864E
    863D
    UVA 1380 A Scheduling Problem
  • 原文地址:https://www.cnblogs.com/tangyin/p/10213488.html
Copyright © 2011-2022 走看看