[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609067#action_12609067
 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-57:
-------------------------------------------------

I have added messages to keep track of what is going on with the server the 
client is connected to:

2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable
2008-06-28 21:02:44,406 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:44,407 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is writable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:54,100 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable
2008-06-28 21:02:54,101 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is writable
2008-06-28 21:02:54,101 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - Doing 
IO
2008-06-28 21:02:54,101 - WARN  [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable

If we follow the timestamps, we see that there has been a gap of 10s between 
calls to doIO(). Before that,  the server was sending pings regularly every 3s. 
Also, from my client log messages, this corresponds to the time that the client 
times out, and so this gap is the cause of the time out on my client. 
Interestingly, once the client disconnects from the first server, it reconnects 
to another server, and the same happens a few minutes later:

2008-06-28 21:06:32,110 -  WARN  - [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Doing IO
2008-06-28 21:06:32,110 -  WARN  - [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is writable
2008-06-28 21:06:46,516 -  WARN  - [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Doing IO
2008-06-28 21:06:46,516 -  WARN  - [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable
2008-06-28 21:06:46,516 -  WARN  - [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Doing IO
2008-06-28 21:06:46,517 -  WARN  - [NIOServerCxn.Factory:[EMAIL PROTECTED] - 
Socket is readable

Now the gap is roughly 14s, though.

> Connection times out when idle
> ------------------------------
>
>                 Key: ZOOKEEPER-57
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-57
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: Flavio Paiva Junqueira
>
> I have observed several connection timeouts with one single client, during 
> periods of inactivity. From reports of other users, it seems that others are 
> observing a similar issue. 
> In my case, tickTime is 2000, and the client sets session timeout to be 
> 10000. Client and servers are on different sites. I suspect there is 
> something wrong with the mechanism that issues ping messages.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to