Flavio Paiva Junqueira commented on ZOOKEEPER-57:

I've been able to verify that in my setup doIO() is actually called fine after 
a call to sendPing. However, it seems that in doIO(), the call to 
sockKey.isReadable() is returning false, and that's why the generated pings are 
not being sent. 

Because doIO is called from SendThread.run(), the following predicate must be 

     ((k.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_WRITE)) != 0)

but because sockKey.isReadable() returns false, it seems that one of the two is 

   1- k != sockKey
   2- (k.readyOps() & SelectionKey.OP_WRITE) != 0

>From the code, it doesn't look like we have "1", so it leaves us with "2". 
>This is still not conclusive, so I'll keep investigating.

> 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