curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordan Zimmerman (JIRA)" <>
Subject [jira] [Closed] (CURATOR-286) Memory leak in service discovery
Date Mon, 11 Jan 2016 18:00:42 GMT


Jordan Zimmerman closed CURATOR-286.
       Resolution: Fixed
         Assignee: Jordan Zimmerman
    Fix Version/s: 3.0.0

In ZooKeeper 3.4.x there is no way to clear a watcher once it is set. This has been addressed
in ZooKeeper 3.5.x and Curator 3.0.0. When using Curator 3.0.x with ZooKeeper 3.5.x the various
Curator recipes remove any watchers when the recipe instances are closed.

> Memory leak in service discovery
> --------------------------------
>                 Key: CURATOR-286
>                 URL:
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.9.1
>            Reporter: Joe Littlejohn
>            Assignee: Jordan Zimmerman
>            Priority: Critical
>             Fix For: 3.0.0
>         Attachments:, curator-286.hprof.tar.gz
> Hi
> I'm seeing a memory leak in my application which makes use of service discovery.
> I've taken heap dumps and I see:
> * Hundreds of thousands of NamespaceWatcher instances. The client, actualWatcher and
curatorWatcher fields are all null, so these are closed NamespaceWatchers.
> * Thousands of PathChildrenCache instances. Each one has a 'path' value that refers to
one of the services I'm lookup up (using a service provider). The state fields shows that
all these PathChildrenCache instances are CLOSED.
> In my application I'm using a service provider to get an instance, then closing that
service provider. It seems that even after doing this, there's still a reference to the NamespaceWatcher
held in ZKWatchManager field childWatches.

This message was sent by Atlassian JIRA

View raw message