Reputation: 828
I have this scenario where I have an Eureka server, a Zuul proxy and the eureka's clients (some API).
The thing is that when I call the Zuul server it does discover the "service" on Eureka but it returns a 504 status time out.
{
"timestamp":"2020-07-21T18:38:46.408+00:00",
"status":504,
"error":"Gateway Timeout",
"message":""
}
In my application.properties I have:
spring.application.name=zuul-server
eureka.instance.preferIpAddress=true
eureka.client.registerWithEureka=true
eureka.client.fetchRegistry=true
eureka.client.healthcheck.enabled=true
zuul.ignored-services=*
zuul.host.time-to-live=-1
zuul.host.connect-timeout-millis=15000
zuul.host.max-per-route-connections=10000
zuul.host.max-total-connections=5000
zuul.host.socket-timeout-millis=60000
zuul.semaphore.max-semaphores=500
I can't figure it out what's wrong to cause this timeout.
Any helping tips?
Upvotes: 2
Views: 1483
Reputation: 828
For those who eventually face this same problem here is how I solved it.
This is how my final application.properties
on the Zuul project is set and working:
spring.application.name=zuul-server
eureka.instance.preferIpAddress=true
eureka.client.registerWithEureka=true
eureka.client.fetchRegistry=true
eureka.client.healthcheck.enabled=true
#zuul.ignored-services=*
#zuul.host.time-to-live=-1
zuul.host.connect-timeout-millis=60000
zuul.host.max-per-route-connections=10000
zuul.host.max-total-connections=5000
zuul.host.socket-timeout-millis=60000
zuul.semaphore.max-semaphores=500
zuul.ribbon.eager-load.enabled= true
hystrix.command.default.execution.isolation.strategy=THREAD
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=40000
ribbon.ConnectTimeout=10000
ribbon.ReadTimeout: 10000
If your IDE complains about "unknown property" just ignore it.
Upvotes: 3