Yesterday in the deployment environment when the entire cluster is an instance error, but Zuul log error
Com.netflix.zuul.exception.ZuulException:Forwarding Error
caused By:java.lang.RuntimeException:java.net.SocketTimeoutException:Read timed out
caused By:java.net.SocketTimeoutException:Read timed out
Obviously, according to the error message, it should be Zuul call waiting time timeout
Add a simplified version of the following configuration in Zuul
# #timeout ConfigHystrix:CommandDefaultExecution:TimeoutEnabledTrueIsolation:ThreadTimeoutinmilliseconds:60000Ribbon: readtimeout: 60000 connecttimeout: 60000 maxautoretries: 0 Maxautoretriesnextserver: 1 Eureka: enabled: falseZuul: Max: Host: connections : $ Host: socket-timeout-millis: 60000 connect-timeout-millis: 60000
This configuration also includes an error in a single instance of the cluster, which controls how the Zuul calls other instances (attempts to recall the number of servers in the cluster, and the number of retries on this instance after the timeout)
At the same time, the Fegin also use the corresponding ribbon and Hystrix configuration, to cover its silent configuration of the three-second timeout, because each time the server restarts, the initial access to the initial session of the process is more time-consuming, so at the time of the initial visit the probability of a large,
Therefore, you need to add a second configuration to counteract the first call timeout after the container initial session.
For the first call timeout, you can also set the corresponding feign.hystrix.enabled=false, it is also possible to turn off Hystrix by default, but not recommended, especially in production environments
Com.netflix.zuul.exception.ZuulException:Forwarding Error