Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Zookeeper average client session timeout

avatar
Contributor

Hello Team,

 

Consider i have a client which is negotiating a timeout from the ZK server.

 

I have observed that 0x36e18413b196cfc  is the session id and i could see that ZK is terminating the connection after 23,419 seconds ??? Could anyone suggest why ?? 

 

 

2020-01-30 01:03:23,762 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@861] - Client attempting to renew session 0x36e18413b196cfc at /xx.xx.xx.xx:37952
2020-01-30 01:03:23,762 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:Learner@108] - Revalidating client: 0x36e18413b196cfc
2020-01-30 01:03:23,762 - INFO [QuorumPeer[myid=1]/0.0.0.0:2181:ZooKeeperServer@617] - Established session 0x36e18413b196cfc with negotiated timeout 10000 for client /xx.xx.xx.xx:37952
EndOfStreamException: Unable to read additional data from client sessionid 0x36e18413b196cfc, likely client has closed socket
2020-01-30 07:33:42,962 - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1033] - Closed socket connection for client //xx.xx.xx.xx:37952 which had sessionid 0x36e18413b196cfc

1 ACCEPTED SOLUTION

avatar
Contributor

The following values are used based on ZooKeeper settings:

 

minSessionTimeout = ticktime * 2,  maxSessionTimeout=ticktime * 20

 

If no Session Timeouts are set in the client, the server will use tickTime*2. Hence, any session which establishes to ZooKeeper, will have this value as a minimum timeout. 
Likewise, if there are no SessionTimout set, the maximum value will be tickTime*20. Hence, any session which establishes to ZooKeeper will have this value as a maximum timeout. 

The sessionTimeout cannot be less than minSessionTimeout (ticktime * 2) or greater than maxSessionTimeout (ticktime * 20)

View solution in original post

2 REPLIES 2

avatar
Contributor

This is on HDP 2.6.5, ZK version : 3.4.6.2

avatar
Contributor

The following values are used based on ZooKeeper settings:

 

minSessionTimeout = ticktime * 2,  maxSessionTimeout=ticktime * 20

 

If no Session Timeouts are set in the client, the server will use tickTime*2. Hence, any session which establishes to ZooKeeper, will have this value as a minimum timeout. 
Likewise, if there are no SessionTimout set, the maximum value will be tickTime*20. Hence, any session which establishes to ZooKeeper will have this value as a maximum timeout. 

The sessionTimeout cannot be less than minSessionTimeout (ticktime * 2) or greater than maxSessionTimeout (ticktime * 20)