WebSocket failing randomly with error code 1006

Continuing the discussion from WSS Closing - Only when proxied via Cloudflare:

We’ve recently migrated to Cloudflare DNS servers and some users experience a dead connection to our WebSockets with error code 1006 randomly after a few minutes/hours. I have the same issue as the attached discussion above. Even the screenshots are the same as well. For reference, we already have the following in place:

  • reconnection handling
  • keep-alive heartbeat
  • supported port numbers

All WebSocket endpoints, hosted on the same domain and external endpoints, connected to our app are encountering this problem. Based on user feedback as well, it mostly happens on laptop devices and once the user has locked his screen and then comes back after a while, the WebSocket is disconnected already and can’t recover.

Here is an example screenshot:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.