Connection close is causing premature exception: connection closed during response
Describe the bug
When Downstream service is sending the response header "connection" : "close", it is resulting in the below error. While the netflix zuul or non reactive spring boot applications - does not result in this. Need help in fixing this.
{"status":500, "error":"Internal Server Error","message":"Connection prematurely closed DURING response","exception":"reactor.netty.http.client.PrematureCloseException","trace":"reactor.netty.http.client.PrematureCloseException: Connection prematurely closed DURING response\r\n\tSuppressed: The stacktrace has been enhanced by Reactor, refer to additional information below: \r\nError has been observed at the following site(s):\r\n\t*__checkpoint ⢠org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]\r\n\t*__checkpoint â
Sample
can someone check this ticket?
Is this resolved, if so how? We too are facing the same exception.
not resolved. am waiting for an answer. thankfully - this is happening only under load and only for "GET" calls. the retry filter from spring cloud gateway does not work - since the downstream app is responding with 200 and our service is able to read it. May be some bad jackson conversion, which is causing this issue while reading the response.
For now, I have added custom retry logic in the filter which exists last and check the response is 500 and the error msg is premature close exception and the request is GET - we are trying it.
We will need a permanent fix for this.
thanks for your response. we are still looking for a solution.
Any update on this?
any update?
Please describe your versions, dependencies, configuration and how to reproduce the problem.
It would be worth taking the time to provide a complete, minimal, verifiable sample (something that we can unzip attached to this issue or git clone, build, and deploy) that reproduces the problem.
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.
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.
@she43 Did you found any solution as i am also facing the exact same issue.