I have a relatively simple chat type application running on Node.js and Socket.io. The node server transfers chat data from the Minecraft server, and then transfers it to any clients connected to the website using Socket.io. A working demo of the system can be found here: standardsurvival.com/chat .
It works fine, for the most part, but from time to time the node server stops responding and active connections die soon. At this time, the process will begin to consume 100% of the processor, but the memory always remains relatively constant, so I doubt the memory leak.
It was very difficult, because I could not reproduce the problem sequentially enough to find out what the problem was, and I did not know where to look. I set up loops and commented on various parts of the pipeline between the node server and the website to try to determine what might cause it. Not lucky yet.
The code for this system can be found here and here .
Any ideas?
source share