On 2/23/09 11:37 PM, "Joey Echeverria" <joe...@gmail.com> wrote:

> Thanks for the link to the documentation. I've been running tests with
> a 5 second session timeout and disconnect events appear frequent. The
> network they're operating on is generally quite, but the disconnects
> to correlate with an increase in activity (e.g. loading data into the
> system).
> 
> Does this seem normal to you or does it imply a potential
> configuration problem on my network?
How many zookeeper quorum servers are you running? What is the config for
the zookeeper servers?

> 
> On a related topic, I was reading the 3.1 client source code,
> particularly the reconnect source, and noticed that the client sleeps
> for up to 1 second before trying to reconnect. This seems excessive
> and with a 5 second session timeout leads to more frequent session
> expirations. Almost every time it sleeps for more than about 800 ms, a
> disconnect is followed by an expiration.
Can you point me to the code which you think does this? A client is supposed
to disconnect itself from a server if it does not hear a response to its
ping's within 1/3 of the session timeout. It should then reconnect to the
other servers. Session expiration  happening so frequently does indicate a
problem. More information on your setup will help.

Thanks
mahadev

> 
> Is this a bug, or desirable behavior?
> 
> Thanks,
> 
> -Joey
> 
> On Mon, Feb 23, 2009 at 10:37 PM, Patrick Hunt <ph...@apache.org> wrote:
>> The latest docs (3.1.0 has some updates to that section) can be found here:
>> http://hadoop.apache.org/zookeeper/docs/r3.1.0/zookeeperProgrammers.html#ch_z
>> kSessions
>> 
>> Patrick
>> 
>> Mahadev Konar wrote:
>>> 
>>> Hi Joey,
>>>  here is a link to information on session timeouts.
>>> 
>>> http://hadoop.apache.org/zookeeper/docs/r3.0.1/zookeeperProgrammers.html#ch_
>>> zkSessions
>>>  The session timeouts depends on how sensitive you want your application
>>> to
>>> be. A very low session timeout like (1-2 seconds) might lead to your
>>> application being very sensitive to events like minor network problems
>>> etc.,
>>> a higher values of say (30 seconds) on the other hand might lead to slow
>>> detection of client failures -- example one of the zookeeper client which
>>> has ephemeral node goes down, in this case the ephemeral nodes will only
>>> go
>>> away after session timeout.
>>> 
>>> I have seen some users using 10-15 seconds of session timeout, but you
>>> should use as per your application requirements.
>>> 
>>> Hope this helps.
>>> mahadev
>>> 
>>> 
>>> On 2/22/09 3:09 AM, "Joey Echeverria" <joe...@gmail.com> wrote:
>>> 
>>>> Is there a recommended session timeout? Does it change based on the
>>>> ensemble size?
>>>> 
>>>> Thanks,
>>>> 
>>>> -Joey
>>> 
>> 

Reply via email to