Zuul timing out in long-ish requests
I have experienced the same problem: in long requests, Zuul's hystrix command kept timing out after around a second in spite of setting ribbon.ReadTimeout=10000
.
I solved it by disabling timeouts completely:
hystrix:
command:
default:
execution:
timeout:
enabled: false
An alternative that also works is change Zuul's Hystrix isolation strategy to THREAD:
hystrix:
command:
default:
execution:
isolation:
strategy: THREAD
thread:
timeoutInMilliseconds: 10000
This worked for me, I had to set connection and socket timeout in the application.yml
:
zuul:
host:
connect-timeout-millis: 60000 # starting the connection
socket-timeout-millis: 60000 # monitor the continuous incoming data flow
The properties to set are: ribbon.ReadTimeout
in general and <service>.ribbon.ReadTimeout
for a specific service, in milliseconds. The Ribbon wiki has some examples. This javadoc has the property names.
In my case I had to change the following property:
zuul.host.socket-timeout-millis=30000