Skip to content
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

Bug: ClientRequestObservationContext increase heap consumption spring-webflux 6.1.1 -> 6.1.2 #32351

Closed
konner91 opened this issue Feb 29, 2024 · 0 comments
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@konner91
Copy link

konner91 commented Feb 29, 2024

Hi together,

I upgraded our application from Spring Boot 3.0.13 to 3.2.2 and I see the same issue as @erimolNordnet reported, too. The issue appears at the moment only in our background job where we make a lot of http requests and the cpu usage is very high. Before we make a request we load some data which could be multiple megabytes. In the screenshot the CancelableContinuationImpl contains the data which was loaded before. It looks like that the netty client underneath is not releasing the memory after the request. Our webclient config uses a connection pool with the lifo setting and the evictInBackground setting is set to 45 seconds. In our api instance we couldn`t see this issue. Maybe this helps to get an idea why this is happening. Our quickfix is to set spring-webflux to 6.1.1.
Another thesis is that the requests attributes where the ClientRequestObservationContext was added are not cleared before the connection is given back to the connection pool and the reference to the rest of the loaded data exists although the processing is finished. I think this issue is old but was not yet relevant because the ClientRequestObservationContext contained only the request headers and not the full request object.

Best,

Konstantin

image

Originally posted by @konner91 in #32198 (comment)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 29, 2024
@konner91 konner91 changed the title Hi together, Bug: ClientRequestObservationContext increase heap consumption Feb 29, 2024
@konner91 konner91 changed the title Bug: ClientRequestObservationContext increase heap consumption Bug: ClientRequestObservationContext increase heap consumption spring-webflux 6.1.1 -> 6.1.2 Feb 29, 2024
@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
@bclozel bclozel added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants