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

Disposing PooledConnections that are not actively used under LRU policy. #1230

Closed
jun-lee opened this issue Jul 29, 2020 · 9 comments
Closed
Labels
type/enhancement A general enhancement

Comments

@jun-lee
Copy link

jun-lee commented Jul 29, 2020

Motivation

My application is using HttpClient to access a massive number of endpoints to provide a Link Preview service. Over time, Netty-related resources are taking a lot of memory as shown below. Mostly by the PooledConnections, they have never been destroyed once they have been initialized for a unique endpoint with the InetSocketAddress as a key, and redundant data like HeaderEntity, DefaultAttribute in each config of the pool.

스크린샷 2020-07-29 오전 11 53 24

Desired solution

Could we have an LRU mechanism to release the old PooledConnections which are not actively reused?

Considered alternatives

Additional context

@jun-lee jun-lee added status/need-triage A new issue that still need to be evaluated as a whole type/enhancement A general enhancement labels Jul 29, 2020
@violetagg violetagg removed the status/need-triage A new issue that still need to be evaluated as a whole label Jul 29, 2020
@violetagg
Copy link
Member

@jun-lee Do you think that this feature request will serve your requirement?
reactor/reactor-pool#86

For which version do you need this feature: 0.9.x or 1.0.0?

/cc @simonbasle

@jun-lee
Copy link
Author

jun-lee commented Jul 29, 2020

@violetagg Thanks for the link. Yes, that's exactly what I'm expecting. And I'm using 1.0.0-M1 because of the Multi Content-Length issues.

@violetagg
Copy link
Member

@jun-lee Multi Content-Length issues?

@jun-lee
Copy link
Author

jun-lee commented Jul 29, 2020

@violetagg this one netty/netty#10349

@violetagg
Copy link
Member

@jun-lee all Reactor Netty releases depend on the latest released Netty version at that point of the release.
So 0.8.20 and 0.9.10 releases use 4.1.51.Final
https://github.com/reactor/reactor-netty/releases/tag/v0.9.10.RELEASE
https://github.com/reactor/reactor-netty/releases/tag/v0.8.20.RELEASE

@jun-lee
Copy link
Author

jun-lee commented Jul 29, 2020

@violetagg Sorry, after checking my code again. This is not related to 1.0.0-M1, but somehow, I was using spring boot 2.4.0-M1, therefore, 1.0.0-M1 was used.

@violetagg
Copy link
Member

@jun-lee Ok so we are targeting 1.0.0? I need this in order to be able to fix the version where this feature request is needed.

@jun-lee
Copy link
Author

jun-lee commented Jul 29, 2020

@violetagg Yes, we are.

@violetagg violetagg added this to the 1.0.0 Backlog milestone Jul 29, 2020
@violetagg
Copy link
Member

This is depending on reactor/reactor-pool#86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants