curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <>
Subject Re: Curator Framework Close() is NOT always shutting down ConnectionStateManager threads
Date Fri, 07 Feb 2014 22:31:12 GMT
Close is supposed to shutdown everything. What version are you using? Can you create a test
case that exhibits the problem?

Jordan Zimmerman

> On Feb 7, 2014, at 4:35 PM, Raji Muthupandian <> wrote:
> Hi Team,
>      We have 5 server Zookeeper ensemble. If any one of the server goes down, connections
are balanced to remaining servers. When the down server comes back, there will not be any
connections to this server unless new clients are connected or connectionLoss happens at client
side. This makes a unequal connection distribution to the servers.
> To avoid this, we thought of having a connection balancer task which closes the existing
connection and creates new connection on every configured time interval. As part of connection
close, we call Curatorframework.close().
>         But in some instances , ConnectionStateManager threads are not closed. Threads
are still in WAITING state to take events from eventqueue. 
> "ConnectionStateManager-0" - Thread t@272
>    java.lang.Thread.State: WAITING
>     at sun.misc.Unsafe.park(Native Method)
>     - parking to wait for <3be45251> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>     at java.util.concurrent.locks.LockSupport.park(
>     at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(
>     at java.util.concurrent.ArrayBlockingQueue.take(
>     at
>     at$000(
>     at$
>     at
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(
>     at java.util.concurrent.ThreadPoolExecutor$
>     at
> This creates lot of dangling threads over a period of time. Is there a way to cleanly
close the connections ?
> is there any better approach to handle connection balancing....
> Thanks
> Raji

View raw message