Com.netflix.zuul.exception.ZuulException:Forwarding Error

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.