zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun M. Krishnakumar" <arunm...@gmail.com>
Subject question on sessionTimeout and ClientCnxn.java:SendThread::run()
Date Tue, 15 Mar 2016 09:04:16 GMT

I am new to zookeeper, so please bear with my questions :)

I use zookeeper along with bookkeeper and see session expiries every now
and then. My tickTime is 3s and Zookeeper is initialized with a
sessionTimeout at 10s. The network connections are controlled, zk is not
under any load and

The message I get is typically from the following lines in ClientCnxn.java:
SendThread::run() :

throw new SessionTimeoutException(
"Client session timed out, have not heard from server in "
       + clientCnxnSocket.getIdleRecv() + "ms"
       + " for sessionid 0x"
       + Long.toHexString(sessionId));

My question is: in the code we do a "clientCnxnSocket.updateNow()" outside
the while loop while we use the same value of 'now' for all subsequent
calculations _within_ the loop in the calls to
"clientCnxnSocket.getIdleRecv()" and "clientCnxnSocket.updateLastSend()".
Won't this begin to gradually veer away from the sessionTimeout / 3 ? IIRC,
the code only updates the value of "now" for (state == States.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message