Server Disconnects Client on Timeout

Occasionally, the FOP2 server will disconnect the client. The server log shows:

2016-07-27 11:50:25,989 INFO - Disconnecting Client on timeout
2016-07-27 11:50:25,989 INFO -
2016-07-27 11:50:25,989 INFO - Client Disconnection - remove client on error from socket AnyEvent::Handle=HASH(0xc504e00) (
2016-07-27 11:50:25,989 INFO -
2016-07-27 11:50:25,989 INFO - Tengo 2 sesiones para el usuario 4159672901 por lo que no ejecuto callbacks de deslogueo
and fop2.js gets the onclose handler for the websocket connection.

I do not understand what the timeout is. The client is sending the ping and the server replies with a pong:

2016-07-27 11:50:23,244 INFO - <= <msg data="1|ping
" />
2016-07-27 11:50:23,244 INFO -
2016-07-27 11:50:23,244 INFO - -- PROCESS_FLASH_COMMAND origen 1 accion ping destino password
2016-07-27 11:50:23,244 INFO -
2016-07-27 11:50:25,988 INFO - => { "btn": "0", "cmd": "pong", "data": ...

As you can see from this log excerpt the disconnect comes right after the server replies to the ping request.

What can we do to prevent this timeout and allow the client to stay connected to the server?

The server is version: 2.29.02


  • "remove client on error"

    That's an error condition from the socket itself, not from FOP2. I cannot say why you are getting those. In any case, try to stay current, upgrade FOP2 to the latest version if you can, be sure to use event filters also for the FOP2 manager user as described in the documentation.

  • I get this often too. The only thing I've found that helps is setting up a separate machine next to the user, like a spare laptop on their desk simply for FOP2. The disconnects stop happening when I do this. If they don't have a separate machine, the disconnects range from a few times a day to sometimes every 10 minutes. Try with a separate machine and see if your disconnects stop too.

    We use google chrome. I know it have a tab discarding feature, but I've disabled that and no improvement.
Sign In or Register to comment.