我看到使用Spring Cloud Zuul网关模式的长请求的504响应。超时发生在请求发出后1分钟。
我尝试过以下无效:
settings.py
和
zuul:
ribbon:
ConnectTimeout: 10000000
ReadTimeout: 10000000
和
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000000
这些都不会在一分钟后阻止网关超时。
答案 0 :(得分:3)
原来是AWS Elastic Load Balancer的空闲超时值。我将空闲超时时间增加到3分钟,问题就消失了。
答案 1 :(得分:1)
尝试这种不同的配置:
# 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