zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Reed <br...@apache.org>
Subject Re: zookeeper client seems to timeout earlier than it should
Date Wed, 02 Nov 2016 22:02:27 GMT
clients need to make sure they move off of a dead server on to a new
one to keep their connection alive, so generally if the client hasn't
heard from the server in 2/3 * sessionTimeout it will try to connect
to someone else. if it waited the whole 4 seconds, when connected to
an active server it would be pronounced dead on arrival.

ben

On Wed, Nov 2, 2016 at 5:11 PM, Whitney, Adam <Adam.Whitney@sony.com> wrote:
> (Sorry if this is a repost … I got a strange response to my original email so I’m
not sure if it went through or not)
>
> I have a zookeeper cluster with 3 nodes and tick time set to 2s
>
> When a client connects to the cluster I see a log entry like this:
>
> INFO  | Session establishment complete on server XXX, sessionid = XXX, negotiated timeout
= 4000 | org.apache.zookeeper.ClientCnxn | main-SendThread(XXX:2181)
>
> Notice the "negotiated timeout = 4000"
>
> But about once a day I see a log entry like this:
>
> INFO  | Client session timed out, have not heard from server in 2953ms for sessionid
XXX, closing socket connection and attempting reconnect | org.apache.zookeeper.ClientCnxn
| main-SendThread(XXX:2181)
>
> Why would the client (apparently) timeout the session after only 2953ms if the negotiated
timeout was 4000ms?
>

Mime
View raw message