curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordan Zimmerman (JIRA)" <>
Subject [jira] [Resolved] (CURATOR-105) Memory leak when using PathChildrenCache
Date Fri, 23 May 2014 15:09:03 GMT


Jordan Zimmerman resolved CURATOR-105.

    Resolution: Fixed

I did several tests using jmap and all the memory from the PathChildrenCaches is now cleared.
Annoyingly, I don't understand why for some of this (clearing the instances watcher objects).
There seems to be some kind of circular reference holding with Guava's cache.

> Memory leak when using PathChildrenCache
> ----------------------------------------
>                 Key: CURATOR-105
>                 URL:
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework, Recipes
>    Affects Versions: 2.4.1, 2.4.2
>         Environment: Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
>            Reporter: Joe Littlejohn
>            Assignee: Jordan Zimmerman
>              Labels: discovery
>             Fix For: 2.5.0
>         Attachments:
> I've observed a memory leak in our production system using Curator service discovery.
> If you run the attached test case 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.
This appears to be a leak that shouldn't occur if the provider is correctly closed each time.
> There is also a heap dump available here:

This message was sent by Atlassian JIRA

View raw message