curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Littlejohn <joelittlej...@gmail.com>
Subject Re: Memory leak when using service providers
Date Tue, 29 Apr 2014 13:13:21 GMT
Here's an example heap dump taken after running the test for a while:

https://dl.dropboxusercontent.com/u/10909453/heapdump-curator-leak.hprof.tar.gz

I recommend Eclipse MAT or VisualVM to analyse this.


On 29 April 2014 11:55, Joe Littlejohn <joelittlejohn@gmail.com> wrote:

> Hi,
>
> I've observed a memory leak in our production system using Curator service
> discovery. I can replicate the problem with 2.4.1 and 2.4.2, though I
> haven't tested any older versions.
>
> This test shows the problem:
>
> https://www.refheap.com/82891
>
> (Hopefully this test is enough to demonstrate the problem. I haven't used
> the TestingServer so you'll need a zk instance with a registered service.)
>
> If you run it and watch the process with jvisualvm you'll see that the
> heap grows and grows as the test is running. Taking a heap dump will reveal
> thousands of ServiceInstance and ServiceCacheImpl instances that are
> retained even though the provider is closed after each usage. The
> references appear to be traced back to the PathChildrenCache. I realise
> it's possible to retain ServiceProvider instances, but this appears to be a
> leak that shouldn't occur if the provider is correctly closed each time.
>
> Can anyone comment on whether this is indeed a problem? Am I missing
> something?
>
> Cheers
>

Mime
View raw message