Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366772

Summary: Idles timeout too fast (WebSocket Message: Idle for 5190ms > 300000ms)
Product: [RT] Jetty Reporter: jfarcand <jfarcand>
Component: websocketAssignee: Greg Wilkins <gregw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox, tbecker
Version: unspecified   
Target Milestone: 7.5.x   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description jfarcand CLA 2011-12-14 18:46:28 EST
Build Identifier: 8.1.0.RC1

Atmosphere WebSocket client receives the folllowin event from Jetty

   Idle for 5190ms > 300000ms

This happens under high load (~10k) but I'm not sure yet if it's a bug in Atmosphere or Jetty. At least the message should be fixed :-) 

I've already reported the issue to Greg but I'm filling an issue to keep track.

Reproducible: Always
Comment 1 Thomas Becker CLA 2011-12-20 12:47:03 EST
After a first glimpse at the code this shouldn't be possible. Will try to reproduce that case in a unit test.
Comment 2 jfarcand CLA 2011-12-20 12:50:30 EST
Thom, I see those under heavy load it that can help. I do see strange CPU spike as well

    https://gist.github.com/1501666

and 

    https://gist.github.com/1501668

will try with the latest SNAPSHOT to see if that help.
Comment 3 Greg Wilkins CLA 2011-12-21 08:41:56 EST
thomas,

I think this issue was due to the fact that the Idle for message was wrongly calculated.   The idletimestamp is reset before the onIdleExpired callback, so the calculation of idle time was wrong.

In this case, the connection had probably been idle for 305190ms.  The heavy load explains why it took 5s to get around to doing the callback.

We now pass the idle time into the call back so the reporting should be correct

So I believe this is resolved.  JFA - can you confirm/deny when you get a chance to try RC2 (or a recent snapshot).  You should not see messages like this.  Please reopen if you do.