Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Socket.io 400 errors #5393
After spending a few days debugging a problem on our forum/nginx, I've finally found a solution to a massive amount of http 400 errors we've seen when loading the nodebb forum. These problems normally only manifest itself on high load.. In our case >500 connected clients.
In the browser console you will see responses like this (for the failed connections):
Set the max_fails on the upstream to something higher than default (1).
I suggest someone to update the NodeBB documentation, including this in the nginx examples.
Upstream issue: socketio/engine.io#458, so I hope you didn't waste your time
But on the upside, now you really know how socket.io works! Perhaps there is a new socket.io version we can upgrade to to resolve this issue... on our instances, we use
Setting a high max_fails is a band-aid, because in our specific case, we had 1000+ connections over 4 servers (8 NodeBBs in total). Despite setting a