Hello Team,

I have created Spring Boot Project with below version,

           <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.1.RELEASE</version>

and below are my application properties and trying to add ribbon.ReadTimeOut and Hystrix timeout, but its throwing a warning.

spring.application.name=zuul server.port=8011 eureka.client.service-url.defaultZone=http://localhost:8010/eureka ribbon.eureka.enabled=true ribbon.restclient.enabled=true zuul.host.connect-timeout-millis=60000 zuul.host.socket-timeout-millis=80000

Due to this i am getting below when i execute through postman and while connecting h2-console,

2020-07-04T16:59:53.882+00:00 504 Gateway Timeout com.netflix.zuul.exception.ZuulException: at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.findZuulException(SendErrorFilter.java:118) at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.run(SendErrorFilter.java:78) at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) at com.netflix.zuul.FilterProcessor.error(FilterProcessor.java:105) at com.netflix.zuul.ZuulRunner.error(ZuulRunner.java:112) at com.netflix.zuul.http.ZuulServlet.error(ZuulServlet.java:145) at com.netflix.zuul.http.ZuulServlet.service(ZuulServlet.java:83) at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:166) at org.springframework.cloud.netflix.zuul.web.ZuulController.handleRequest(ZuulController.java:45) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:832) com.netflix.zuul.exception.ZuulException: Hystrix Readed time out

Comment From: spencergibb

Please post the rest of your configuration

Comment From: rbk111088

4.0.0 org.springframework.boot spring-boot-starter-parent 2.3.1.RELEASE com.rbarath.github.photoapp.api.gateway PhotoAppApiZuulApiGateway 0.0.1-SNAPSHOT PhotoAppApiZuulApiGateway Zuul API Gateway

<properties>
    <java.version>1.8</java.version>
    <spring-cloud.version>Hoxton.SR5</spring-cloud.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

Comment From: rbk111088

Below is from my API class

server.port=${PORT:0} spring.application.name=users-ws eureka.client.service-url.defaultZone=http://localhost:8010/eureka spring.devtools.remote.restart.enabled= true eureka.instance.instance-id=${spring.application.name}:${spring.application.instance_id:${random.value}} spring.h2.console.enabled=true spring.h2.console.settings.web-allow-others=true spring.datasource.url= jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password= spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

Comment From: rbk111088

I don't see any feedback here, i posted rest of the configuration which i had configured at my application

Comment From: spencergibb

I need your zuul configuration

Comment From: rbk111088

Below is my simple Zull Class

package com.rbarath.github.photoapp.api.gateway;

import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; import org.springframework.web.bind.annotation.CrossOrigin;

@SpringBootApplication @EnableEurekaClient @EnableZuulProxy public class PhotoAppApiZuulApiGatewayApplication {

public static void main(String[] args) {
    SpringApplication.run(PhotoAppApiZuulApiGatewayApplication.class, args);
}

}

pom.xml from Zuul

4.0.0 org.springframework.boot spring-boot-starter-parent 2.3.1.RELEASE com.rbarath.github.photoapp.api.gateway PhotoAppApiZuulApiGateway 0.0.1-SNAPSHOT PhotoAppApiZuulApiGateway Zuul API Gateway

<properties>
    <java.version>1.8</java.version>
    <spring-cloud.version>Hoxton.SR5</spring-cloud.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>${spring-cloud.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

application.properties

spring.application.name=zuul server.port=8011 eureka.client.service-url.defaultZone=http://localhost:8010/eureka ribbon.eureka.enabled=true ribbon.restclient.enabled=true zuul.host.connect-timeout-millis=60000 zuul.host.socket-timeout-millis=80000 hystrix.command.default.execution.isolation.strategy=THREAD hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds= 212000 ribbon.readtimeout=60000 ribbon.ConnectTimeout=60000

I don't have any other configuration at my side, its simple app i am trying to execute

Comment From: rbk111088

Any updates ?

Comment From: franzisk

@rbk111088 did you manage to solve this problem? I am facing the same one here.

Here is some info about it: Using Spring Boot 2.3.1 and Spring Cloud Hoxton.SR6

As people suggest I put this 3 lines but Eclipse says it is "unknown property" for them:

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=11000
ribbon.ConnectTimeout=10000
ribbon.ReadTimeout: 10000

There rest of my application.properties is:

spring.application.name=zuul-server

eureka.instance.preferIpAddress=true
eureka.client.registerWithEureka=true
eureka.client.fetchRegistry=true
eureka.client.healthcheck.enabled=true

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

Comment From: holy12345

@rbk111088 @franzisk Try hystrix timeout larger than ribbon time (include default ribbon retry)

Comment From: OlgaMaciaszek

@rbk111088 @franzisk . Has the workaround proposed by @holy12345 worked for you?

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.