You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Jordan Zimmerman (JIRA)" <ji...@apache.org> on 2017/10/19 13:13:00 UTC

[jira] [Commented] (CURATOR-437) zookeeper connection leak when session expires.

    [ https://issues.apache.org/jira/browse/CURATOR-437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16211014#comment-16211014 ] 

Jordan Zimmerman commented on CURATOR-437:
------------------------------------------

Setting the ZK state to CLOSED is not an issue because the ClientCnxn is set to exit (via event of death). I started a ZK instance, had some code call injectSessionExpiration(). The number of connections reported by 'srvr' stays consistent - i.e. I don't see any extra connections. Can you provide a test that shows the issue?

> zookeeper connection leak when session expires.
> -----------------------------------------------
>
>                 Key: CURATOR-437
>                 URL: https://issues.apache.org/jira/browse/CURATOR-437
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 4.0.0
>            Reporter: zealot
>
> https://github.com/apache/curator/blob/master/curator-client/src/main/java/org/apache/curator/utils/InjectSessionExpiration.java#L97
> Curator inject will set zookeeper state to CLOSED when session expires without close zk associated threads.
> If state set to CLOSED, ZooKeeper.close() function won't be able to release resources properly, which lead to memory and connection leak.
> To reproduce, create a curator client, then shutdown zk server, wait for session timeout, restart the zk server. There will be two ZooKeeper instances and two connections to the server.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)