GrizzlyResponse object reachable from SelectorRunner thread local

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GrizzlyResponse object reachable from SelectorRunner thread local

Rodrigo Merino
Hi,

We are using grizzly (version 2.3.21) 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:

Inline image 1
In a case where the size of the transferred data is big, i see some heavy memory usage.

Question is, are those references held on purpose and would be removed eventually as the application runs or is this a bug that could potentially cause a memory leak? In any way, i would expect these objects to not be held by the connection once the http transfer has finished.

Thanks in advance,
Rodro


--
Rodrigo Merino, ESB Developer
 
Av. Corrientes 316 Entre Piso, Buenos Aires, C1043AAQ, Argentina
 

 
      We're hiring!

Reply | Threaded
Open this post in threaded view
|

Re: GrizzlyResponse object reachable from SelectorRunner thread local

oleksiys
Administrator
Hi Rodro,

could you pls. create an issue and link the testcase, so we can look into that?

Thanks.

WBR,
Alexey.

On 12/21/15 12:24 PM, Rodrigo Merino wrote:
Hi,

We are using grizzly (version 2.3.21) 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:

Inline image 1
In a case where the size of the transferred data is big, i see some heavy memory usage.

Question is, are those references held on purpose and would be removed eventually as the application runs or is this a bug that could potentially cause a memory leak? In any way, i would expect these objects to not be held by the connection once the http transfer has finished.

Thanks in advance,
Rodro


--
Rodrigo Merino, ESB Developer
 
Av. Corrientes 316 Entre Piso, Buenos Aires, C1043AAQ, Argentina
 

 
       We're hiring!


Reply | Threaded
Open this post in threaded view
|

Re: GrizzlyResponse object reachable from SelectorRunner thread local

Rodrigo Merino
Hi Alexey,

While building the testcase, i found that the problem happens only when using grizzly + AHC. When using grizzly alone it doesn't happen.


Thanks,
Rodro

On Mon, Dec 21, 2015 at 5:34 PM, Oleksiy Stashok <[hidden email]> wrote:
Hi Rodro,

could you pls. create an issue and link the testcase, so we can look into that?

Thanks.

WBR,
Alexey.


On 12/21/15 12:24 PM, Rodrigo Merino wrote:
Hi,

We are using grizzly (version 2.3.21) 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:

Inline image 1
In a case where the size of the transferred data is big, i see some heavy memory usage.

Question is, are those references held on purpose and would be removed eventually as the application runs or is this a bug that could potentially cause a memory leak? In any way, i would expect these objects to not be held by the connection once the http transfer has finished.

Thanks in advance,
Rodro


--
Rodrigo Merino, ESB Developer
 
Av. Corrientes 316 Entre Piso, Buenos Aires, C1043AAQ, Argentina
 

 
       We're hiring!





--
Rodrigo Merino, ESB Developer
 
Av. Corrientes 316 Entre Piso, Buenos Aires, C1043AAQ, Argentina
 

 
      We're hiring!