-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Direct buffer memory leak in HttpClient #12084
Comments
By any chance, have you collected a heap dump of the JVM that encountered that leak that you could share with us? Thanks! |
I have a heap dump. Unfortunately I cannot share it because it contains user data and security credentials. |
Here is a short list of things from this heap dump that could help us:
Could you please also confirm that you're using the default buffer pool? If not, please share how exactly you set up the pool that you configure on the client. As a workaround, you could set a tuned byte buffer pool onto your The thing the above workaround would do is to avoid using a retainable pool (thanks to the last two Let us know if this helps. |
See https://issues.apache.org/jira/browse/SOLR-17376 The buffers are direct. The Random samples from the 458485 Here's another example with inbound references shown, starting from I'm not sure that we're using the default buffer pool because we're only using the Jetty client indirectly through the Solr client. The code in https://issues.apache.org/jira/browse/SOLR-17376 shows how it is created. The Jetty client is encapsulated by the Solr client, so we don't have any influence on how the Jetty client is configured. |
You can create a Jetty HttpClient, customize it as you wish, and provide it to Solr's Builder. |
In case it helps. Webtide (https://webtide.com/what-we-do/) is providing commercial support for Jetty and so can sign a NDA as part of the commercial support. |
An alternative to using a leak-resistant pool is to wait for the soon-to-be-released Jetty 10.0.23 and use the new leak tracking pool so the pool can collect data about the leaked buffers; but you would still need to collect a heap dump and either share it with us or analyze it on your own. |
Jetty version
Jetty 10.0.21
Java version/vendor
OS type/version
Windows Server 2019
Description
The latest Solr 9.6.1 Java client which uses the
org.eclipse.jetty.client.HttpClient
internally suffers from direct ByteBuffer memory leaks which probably come from Jetty's internal ByteBuffer pools.A detailed description of the problem is provided by https://issues.apache.org/jira/browse/SOLR-17376 in Solr's bug tracker.
Keywords: HttpClient, DirectByteBuffer, RetainableByteBuffer, ArrayRetainableByteBufferPool
The text was updated successfully, but these errors were encountered: