Long-lived TCP connections are dropped

Hi,

We have a long-lived websocket. It gets killed every sixty seconds. We also have another service that does some slow processing in response to requests, and those connections also get killed prematurely. Sending pings or null bytes avoids this, but it would be nice to be able to configure this somehow.

Thanks!

It would be great if the timeout was configurable, but regarding websockets you should expect it to break down even if Fly didn’t kill it after 60 seconds of silence.

Websockets are quite unreliable. Libraries like Socket IO can reconnect automatically, keep alive, implement a heart beat to check whether the other side is still there, etc.

Expected, see: Is it possible to increase the timeout to 120 sec

Fly eng team can increase TCP timeouts per app, however.

This will be configurable some day. We’ll also default to higher timeouts on paid plans when we ship paid plans, it’s an easy thing to do.

If you only need one-way communication (server to client, e.g to notify when a job has completed) and don’t need to support IE (shudder) you could maybe use SSE instead of a websocket. Apparently they reconnect automatically so would have no timeout issues.