-
Notifications
You must be signed in to change notification settings - Fork 646
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
The EpollSocketChannel object is too large to be reclaimed by the jvm #3416
Comments
We have the same issue. |
All, Please try to provide a reproducible example |
Ok, we will try to reproduce the scene locally with the jmeter pressure test interface, which will take a day |
@userlaojie any luck so far? I myself have been unable to reliably reproduce it. Considering that in my heap dump, the pool refs are all in |
Hi @userlaojie, I strongly believe you came across the same problem as I did, please check my issue if you observe the same behavior. I spent a lot of time trying to simulate it locally, but never managed to produce a reliable reproducer. |
Hi, I managed to replicate part of the problem and currently discussing it on gitter. If you have the same problem, there are 2 ways how to mitigate it at the moment. Either replace reactor-netty with different, WebClient supported library (we used Apache HttpClient 5, works well), or if you can handle it disable connection keepAlive. In our case, both options eliminate the leak. Of course disabling keepalive is not great and a long-term solution, but you can at least verify if its the same problem. Performance hit will depend on your use case. |
I'm working on a fix for an issue that I found with the reproducer that @vitjouda provided on Gitter |
…3459) - When terminating detach the connection from request/response objects - Move registration to terminate event outside of doFinally when we have the real connection - Obtain the event loop outside of doFinally when we have the real connection - Dispose the connection only if it is not disposed Related to #3416, #3367
@userlaojie @vitjouda #3459 should be addressing this issue. If you are able to test the snapshot version, it will be great! |
Hi, I am going to deploy the snapshot and let it sit for a day or 2 and report back. Thank you for the fix. |
Hi again, I tested the snapshot and it looks good! Thank you for the fix :) |
Hello, we are revamping our system with spring-webflux. After the service was started in a Linux environment, it was found that the memory kept increasing, and the memory was never reclaimed by the jvm. After pulling the service dump file, we suspected that the webclient connection pool was cross-referenced, resulting in the EpollSocketChannel object not being reclaimed.
Please help to check whether there is any problem with webclient configuration, or you can check it from other aspects. Thank you.
This is MAT after analyzing a single object over 80M.
This is the jvm memory monitoring usage.
Steps to Reproduce
The webclient configuration parameters are as follows:
Possible Solution
I have two considerations. The first is that ByteBuf references are not released in epoll model, and the second is that webclient connection pool has configuration problems.
Your Environment
netty
, ...):java -version
):OpenJDKuname -a
):CentOS Linux 7 (Core)The text was updated successfully, but these errors were encountered: