spring-cloud-netflix: Hystrix - Caused by: java.util.concurrent.TimeoutException:

I am on Spring Cloud Edgware.RELEASE trail. I am using ribbon with Eureka. I have @EnableFeignClients annotation on my API Gateway. I am overriding the timeout configurations as below. `

ribbon.ReadTimeout=30000 ribbon.ConnectTimeout=30000 hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=100000

` Even then, APIGateway is throwing the timeout exception. The service is processing the request in good time only but API Gateway is not considering it. This happens like once in 2 requests. Very random.

Please suggest if I miss any configuration.

About this issue

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

Most upvoted comments

Upgrading Zuul alone improved the connectivity issue. But still, I am getting the below exceptions in Zuul server.

` Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 172.31.47.91:8000 [/172.31.47.91] failed: connect timed out

I Have the below configs in Zuul now. ribbon.eureka.enabled=true zuul.host.connectTimeoutMillis=600000 zuul.host.socketTimeoutMillis=600000

#30 seconds timeout ribbon.ReadTimeout=30000 ribbon.ConnectTimeout=30000 hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=100000 `

Hi @rodrite , the issue was not with Spring Cloud. The APIGateway had access issues connecting to client services. I fixed the access issues.

Hi @dulimitta , i have the same exception in my own Zuul API Gateway. What do you mean with an access issue? How did you resolve the problem exactly?

Thanks!!

yes @trngan the issue was not related to the Hystrix (thanks to @ryanjbaxter for guiding me in the right direction). It was an access issue. The Zuul API Gateway was not able to connect to the other services. After fixing the access issue, it worked like a charm.