Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Websockets being disconnected - please help

WebSockets, like any TCP connection, is prone to timeouts of various sorts, partially depending on your network.

One way to handle this, is to send out periodic heartbeats. Our setup sends a single byte every 10 seconds to verify the connection.

Beyond that, I believe there's some Jetty timeout setting, but the Jetty team can probably be more helpful with that.

On Tue, May 19, 2015 at 5:14 PM, Stuart Henderson <kryten68@xxxxxxxxxxxxxx> wrote:
Hi,

I'd be deeply grateful for any assistance anyone could offer with this problem, which is causing me extreme pain.

We have a Java test which instantiates websockets over which we are sending JSON requests to an Apache webserver. The webserver is reading the JSON which in turn sets the state for various virtual users. 

After the initial websocket set up and a couple of JSON exchanges the session can often go quiet for some time and the next communication might be as much as 50 minutes away. When this happens and our test sends a simple state change after about 50 minutes we get a websocket.closed() and an event code of 1006. Obviously the state change fails and our test is trashed.

The 'client' test is running on a Windows Server 2008R2. We are running out of ideas about how to further troubleshoot this. A simulated session running in Chrome on the same server and talking to the same Apache webserver works just great, its just the Java test with the Jetty implementation that fails. The test, when run on a W7 workstation is okay... it seems to be the combination of Jetty 9.xx AND the Windows Server 2008R2 that breaks it.

I've wiresharked the connections... but as we are using wss:// it's almost impossible to see what's going on on the wire. All I can see is that at the 50min mark the client tries to send the request and gets nothing back from the server. There are four retransmissions 1.2s apart then the session crashes out and the websocket.closed() is printed.

To say this problem is causing us pain is putting it very lightly. Can anyone point me in the right direction with with how to troubleshoot this or get more information?

Thanks,
Stuart


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top