All my websocket connections arrive over the http(s) port and are proxied to the backend WS server:
[client]----[cloudflare]----[Apache 2.4 mod_proxy_wstunnel]----[websocket server]
Once a client connects to my WS server, if no data goes through the socket, the connection is always cut off after exactly 100 seconds.
In the dev environment, with the same client, also using mod_proxy_wstunnel
, and the same WS server, this limitation does not occur
If the WS server sends a ping every 60 seconds, the connection is not cut off.
I'd like to know whether anyone has seen documentation about Cloudflare disconnecting quiet WS connections, and whether mod_proxy
as it is setup on the server could be the cause. I'm not sure how to get to the bottom of this.
A support tech confirmed to me via email that Cloudflare automatically disconnects websocket connections that remain dormant for 100 seconds.