-
Notifications
You must be signed in to change notification settings - Fork 1.6k
GrizzlyResponse object reachable from SelectorRunner thread local #1067
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
Comments
Just in case, this situation doesn't happen when using grizzly alone (without AHC) |
Just being curious, can you reproduce such leak with the Netty provider? |
Hi, Switching to the netty provider there is no reference to the response, the given test is ok in that case. |
Thanks for your feedback. |
@elrodro83 thank you! I'll take a look asap |
#1067 "GrizzlyResponse object reachable from SelectorRunner thread local"
pls. check if the fix works for you. |
Worked like a charm! |
This fix was shipped with 1.9.32 that's already out. |
Hi,
We are using grizzly through AHC to perform some HTTP requests. After those requests have finished, in a thread dump i can still see the response objects being referenced, and not being garbage collected. Attached is a screenshot of there references from a heap dump:
In a case where the size of the transferred data is big, i see some heavy memory usage.
The problem seems to be with the reference chain TCPNIOConnection -> IndexedAttributeHolder -> $Snapshot -> HttpTransactionContext. Perhaps at least one of those references should be discarded after the request has completed, or provide a way to an app to clear that.
The following test can reproduce this issue.
Thanks in advance,
The text was updated successfully, but these errors were encountered: