I have a Node.JS server installed with socket.io on VPS , and every 10 seconds I transfer the number of connected clients to all. This usually works fine, although it often happens, the connection cannot be established, and I get this error (I changed the IP a bit):
GET http://166.0.0.55:8177/socket.io/1/?t=1385120872574
After reloading the site, as a rule, the connection can be established, although I have no idea why the connection failed in the first place, I also don’t know how to debug socket.io code. Sometimes I can no longer connect to the server, and I need to restart the server.
Additional Information:
- My main site runs on a different server (using the LAMP environment with CakePHP) than the Node.js. server
- I use forever to start the server
- I have many connected clients (about 1000).
- My VPS has 512 MB RAM and the processor never exceeds 25%
source
share