Issue
I am new to Spring boot with Zuul Api Gateway.When I declare the Timeout properties for zuul in application.properties file, it is not picking up.I Guess I have missed some library.
These are the configuration I have added and set to 60 sec timeout. hystrix.command.messages.execution.isolation.strategy=THREAD hystrix.command.messages.execution.isolation.thread.timeoutInMilliseconds= 100000 ribbon.readtimeout=60000 ribbon.ConnectTimeout=60000
And these are the Lib
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
<version>2.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
<version>2.1.1.RELEASE</version>
</dependency>
Kindly suggest me.
Solution
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=100000
ribbon.ReadTimeout=100000
ribbon.ConnectTimeout=100000
override ribbon.ReadTimeout and ribbon.ConnectTimeout as well with hystrix.command property.
use default for global setting. use the service-id instead for service level setting.
Answered By - wannix
Answer Checked By - Pedro (JavaFixing Volunteer)