Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty web sockets drops messages?

Hi Lars,

thanks for providing the test case. However we've some loadtests as well and they have a similar setup without using a foreign client library like your test and they all work fine. For instance "" in jetty8.

If you can provide a test without using a foreign library and using jetty's api only, then we'll do some further investigations. Until then we presume that the issue is in the library you use as we've working load tests for jetty and cometd.


On 10/10/11 11:09 PM, Lars J. Nilsson wrote:

Here's a strange behavior I'm looking at: Sending more than 3 quick consecutive messages to a WebSocketServlet fails silently, it looks as if the messages are dropped. The 4th and onward messages never seem to reach the web socket. This can be reproduced consistently on my environment.

I'm attaching a unit test case which demonstrates the problem. Playing around, it seems that it is the SelectChannelConnector that somehow screws it up, using the old SocketConnector works. It also appears to be a timing-realted issue, adding a Thread.sleep(X) between the messages makes it work.

The attached Maven project uses the Weberknecht client libraries to connect to the server. Those aren't in any repository as far as I know, but you can download them here: My appologies for the inconvenience.

I assume this can be related to:

My environment is:

Linux 2.6 x86_64 (Mandriva)
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

Also attached is a thread dump when the test was waiting for messages to echo back. It looks normal to my eyes, but I'm no Jetty expert.

What do you guys think?

/Lars J. Nilsson

jetty-users mailing list

thomas becker
tbecker@xxxxxxxxxxx /
(the folks behind jetty and cometd)

Back to the top