New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReactorNettyClientResponse should not dispose connection #32528
Milestone
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Mar 25, 2024
Thanks for the report and the sample. I want to acknowledge I was able to reproduce the issue on MacOS as well (although the exception is a little bit different):
We need to investigate the root cause of this. |
snicoll
added
type: bug
A general bug
and removed
status: waiting-for-triage
An issue we've not yet triaged or decided on
labels
Apr 4, 2024
snicoll
changed the title
RestClient + ReactorNettyClientRequestFactory: "BindException: Address already in use" when using many requests
RestClient with ReactorNettyClientRequestFactory can block Netty's event loop
Apr 4, 2024
poutsma
added a commit
to poutsma/spring-framework
that referenced
this issue
Apr 5, 2024
This commit fixes two issues in ReactorNettyClientRequestFactory and related types: - Ensure that the response body is drained and closed when the response itself is closed, and remove the disposing of the connection, as this will disable the connection pool. - Schedule blocking calls on a different scheduler, defaulting to the bounded elastic scheduler. Closes spring-projectsgh-32528
poutsma
changed the title
RestClient with ReactorNettyClientRequestFactory can block Netty's event loop
ReactorNettyClientResponse should not dispose connection
Apr 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Data:
Java: 17
Spring Boot: 3.2.4
Operating System: Windows 11 Enterprise 64-Bit
Notes:
.requestFactory(new ReactorNettyClientRequestFactory())
.WebClient
toRestClient
. It does not occur when usingWebClient
instead ofRestClient
.Minimal working/failing example:
See the code below. See also the attached minimal example from
Spring Initializr
.demo.zip
Dependencies:
Code:
Expected behavior:
Executing many requests using
RestClient
andReactorNettyClientRequestFactory
in succession does not fail with an exception.Actual behavior:
Failure with exception:
The text was updated successfully, but these errors were encountered: