spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

Spring Cloud Gateway Server MVC - keeps loading forever after exactly 5 requests from the browser

Open sakshi-dombre-db opened this issue 7 months ago • 6 comments

Describe the bug spring-boot version=3.4.3 spring-cloud-starter-gateway-mvc version=4.2.2 httpclient5 version=5.5 Java=17 I am using spring cloud gateway server mvc to serve a react.js frontend. The gateway works fine for exactly 5 requests, upon the 6th request the browser keeps loading forever and no request is received-- neither at the gateway(backend) or the frontend. This issue occurs only when apache httpclient5 is present on the classpath. When removed everything works fine. But I need to use httpclient5 for other functions too.

I have also tried using different versions of gateway-mvc/spring-boot/httpclient5 but the issue persisted. I have not provided any custom configurations for the httpclient.

If this property is set the gateway atleast works for 5 requests, on removing this property..it does not work even at 1st request and keeps on loading forever. spring.cloud.gateway.mvc.http-client.type=AUTODETECT is already set.`

Sample A simple spring-boot application used for redirecting requests to a react.js frontend. No custom configurations used for any library.

@spencergibb would greatly appreciate your help to understand what is happening here!

sakshi-dombre-db avatar May 27 '25 07:05 sakshi-dombre-db

can you provide a MCVE ?

joaquinjsb avatar May 27 '25 19:05 joaquinjsb

MCVE is a minimal, complete, verifiable example (something that we can unzip attached to this issue or git clone, build, and deploy).

spencergibb avatar May 27 '25 20:05 spencergibb

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.

spring-cloud-issues avatar Jun 03 '25 20:06 spring-cloud-issues

Found the issue- This only occurs when the frontend application uses react version 15 or lower. React version 17 and above works fine.

sakshi-dombre-db avatar Jun 04 '25 05:06 sakshi-dombre-db

Still waiting for a project that reproduces the problem as requested above

spencergibb avatar Jun 04 '25 12:06 spencergibb

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.

spring-cloud-issues avatar Jun 11 '25 12:06 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.

spring-cloud-issues avatar Jun 18 '25 12:06 spring-cloud-issues