Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B72C1200BB3 for ; Wed, 2 Nov 2016 23:02:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B5E4D160AFB; Wed, 2 Nov 2016 22:02:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 08299160AF0 for ; Wed, 2 Nov 2016 23:02:29 +0100 (CET) Received: (qmail 49805 invoked by uid 500); 2 Nov 2016 22:02:29 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 49793 invoked by uid 99); 2 Nov 2016 22:02:28 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2016 22:02:28 +0000 Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id A5E7C1A018B for ; Wed, 2 Nov 2016 22:02:28 +0000 (UTC) Received: by mail-oi0-f41.google.com with SMTP id 128so41474234oih.0 for ; Wed, 02 Nov 2016 15:02:28 -0700 (PDT) X-Gm-Message-State: ABUngvd2HohntvJuOye/jwzt/aONthJk/UB5/MrJz8YBok8C1lU+7hRGSF+Rt/nYnQHbUoM8pQWzI8gOx/HTRw== X-Received: by 10.107.164.3 with SMTP id n3mr6904825ioe.88.1478124147993; Wed, 02 Nov 2016 15:02:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.198.15 with HTTP; Wed, 2 Nov 2016 15:02:27 -0700 (PDT) In-Reply-To: <9A7B5251-F2C6-4109-BEBE-37BC3B49F542@am.sony.com> References: <9A7B5251-F2C6-4109-BEBE-37BC3B49F542@am.sony.com> From: Benjamin Reed Date: Wed, 2 Nov 2016 18:02:27 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: zookeeper client seems to timeout earlier than it should To: "user@zookeeper.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Wed, 02 Nov 2016 22:02:30 -0000 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 wrote= : > (Sorry if this is a repost =E2=80=A6 I got a strange response to my origi= nal email so I=E2=80=99m 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 =3D XXX, = negotiated timeout =3D 4000 | org.apache.zookeeper.ClientCnxn | main-SendTh= read(XXX:2181) > > Notice the "negotiated timeout =3D 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 fo= r sessionid XXX, closing socket connection and attempting reconnect | org.a= pache.zookeeper.ClientCnxn | main-SendThread(XXX:2181) > > Why would the client (apparently) timeout the session after only 2953ms i= f the negotiated timeout was 4000ms? >