spring-cloud-netflix: First request through Zuul/Euruka will always timeout. Subsequent requests then behave as expected (no timeouts).

Hi all,

Hoping to receive some advice about a timeout issue we’re repeatedly experiencing.

We have a number of microservices that are integrated with Eureka and Zuul. Whenever we start up our services (including the Eureka and Zuul services), the first request that hits Zuul will always timeout. This timeout will occur regardless of how long we wait (i.e. the timeout will occur even if we wait 15 mins after starting up). After this first request, Zuul/Eureka then seem to wake up and all subsequent requests will work as expected. Has anyone else experienced this?

This file contains the full Zuul stack trace we experience on the first request. The pertinent parts of the stack trace are also pasted below:

com.netflix.zuul.exception.ZuulException: Forwarding error
 	at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException(RibbonRoutingFilter.java:170)
 	at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:145)
 ....
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: my-service-id timed-out and no fallback available.
 	at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:805)
 	at com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:790)
....
Caused by: java.util.concurrent.TimeoutException: null
 	at com.netflix.hystrix.AbstractCommand.handleTimeoutViaFallback(AbstractCommand.java:980)
 	at com.netflix.hystrix.AbstractCommand.access$500(AbstractCommand.java:59)
 	at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:595)
 	at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:587)
 	at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140)

Thank you.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

@nestramix @ryanjbaxter As he says his problem is only on the first hit, ribbon eager loading should help - ribbon.eager-load.enabled = true

The clients

Might possibly be related to #1334. Maybe try out the fix in PR ##1749