Jump to content

Websocket disconnects with 1006 error, without a reason


Recommended Posts

I'm logging disconnects in my web game. It seems 75% of the sessions are getting disconnected with the code 1001 (normal) and 25% are getting disconnected with the code 1006 (error). https://tools.ietf.org/html/rfc6455

Sometimes on the error reason I see this text: 


CloudFlare WebSocket Proxy restarting

But he majority of 1006 disconnects don't give any reason at all. The players just disconnect with no reason at all. This usually happens at 5-30 minutes mark while the player is actively playing the game. 

The setup I'm has these:

 - Node.js  
 - Express.js 
 - Cloudflare   
 - Digital Ocean  

- Docker
 - https://github.com/websockets/ws
 - SSL
 - Nginx timeout = 3600s
 - Ping/Pong isAlive = 30s

My question is:

1. How can I debug this problem better? 
2. What are common cases which might be causing this problem?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...