繁体   English   中英

Spring Zuul - 网关超时

[英]Spring Zuul - Gateway Timeout

我看到使用Spring Cloud Zuul网关模式的长请求有504个响应。 超时发生在请求发出后1分钟。

我试过以下无济于事:

zuul:
  ribbon:
    ConnectTimeout: 10000000
    ReadTimeout: 10000000

和:

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

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

这些都不会在一分钟后阻止网关超时。

结果是AWS Elastic Load Balancer的空闲超时值。 我将空闲超时增加到3分钟,问题就消失了。

尝试这种不同的配置:

# Disable Hystrix timeout globally (for all services)
#hystrix.command.default.execution.timeout.enabled: false

# Disable Hystrix timeout for a single service
#hystrix.command.<serviceName>.execution.timeout.enabled: false

# Increase the Hystrix timeout to 60s (globally)
#hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 60000

# Increase the Hystrix timeout to 60s (per service)
#hystrix.command.<serviceName>.execution.isolation.thread.timeoutInMilliseconds: 60000

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM