Unanswered question

How can I increase the websocket timeout?

I'm having the problem that I can't disable the NeoLoad websocket timeout of 5 minutes.
After 5 Minutes without communication at the websocket, the successfully connected websockets get the error

"Error Code: NL-WEBSOCKET-CHANNEL-ENGINE Message: Error occurred while executing WebSocket channel. Details: java.net.SocketTimeoutException: Timeout on Read at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onReadTimeout(AbstractWebSocketConnection.java:588) at org.eclipse.jetty.io.AbstractConnection.onFillInterestedFailed(AbstractConnection.java:161) [...]"

  • The Timeout does not happen when monitoring the site with the Chrome developer tools
  • changing the "controller.properties" parameter "runtime.so.timeout" and "controller.recorder.client.so.timeout" does not have any effect
  • -- I changed it to 0 and to 600000 ms (10 minutes) - every time the timeout comes after 5 minutes
    -- also recording shows a new websocket initialisation every 5 minutes

    • Adding the parameter "websocket.client.connection.timeout" did not help, since the connection ist successfully established, just not kept longer then 5 minutes

    Thank you for submitting an Idea what else I could try!

Günter-Albert E.
Günter-Albert E.

Günter-Albert E.

Level
0
42 / 100
points

Answers

Keith L.
Keith L.

Keith L.

Level
2
1371 / 2000
points
Team

Errors and conditions like this can be caused by some timeouts or websocket channel size for memory. Here is some configuration changes that might help:

One possibility might be that the websocket channel is timing out.

By default, it is 15 seconds, or 15000 ms. There is a hidden undocumented key you can add in the config file {Neoload install dir}\conf\controller.properties:

[WebSocket]
websocket.client.connection.timeout=15000 // value is milliseconds for the connection timeout to establish a WebSocket channel connection. From 5.2.3. Default value is 15000ms so 15 seconds.

The 15000 could be adjusted to 30000 or 60000. Save the file and restart Neoload to take effect.

Also, Neoload uses jetty library for websocket. This library limit by default for the websocket frame is 64k on each direction.

he key websocket.max.text.message.size changes this limitation for websocket text messages. The value would be in bytes, so 64000 is for bytes, or 64k. You can use something like 512000 for 512k maybe. Put this key in the same WebSocket section. if it is a binary data in Websocket frame, use the key below. Restart Neoload after any changes.

There is the same for binary messages: websocket.max.binary.message.size

NOTE: Remember, after any changes, you need to restart NeoLoad for them to take effect.

Günter-Albert E.
Günter-Albert E.

Günter-Albert E.

Level
0
42 / 100
points

Tahnk you for the suggestions, sadly none of these solve the Problem.
After exactly 5 minutes without a message from the Server, I get the timeout error. Even setting the runtime.so.timeout parameter to 60000 for 1 Minute doesn't change the behaviour.

Right now I'm trieieng to close the socket before it times out- this works only at "check script" and not at runtime. Error message is "Connection already closed".

Günter-Albert E.
Günter-Albert E.

Günter-Albert E.

Level
0
42 / 100
points

After opening a Support Request I got an Hotfix Version 7.2.3 for this problem. The parameter
websocket.client.max.idle.timeout was added to change the timeout behaviour.