I'm running a Socket.IO server with Node.JS, which normally uses about 400 MB of memory, because there's a lot of data being cached to send to clients. However, after a couple of hours it suddenly starts growing to 1.4 GB of usage over about 40 minutes. Someone told me to use heapdump to find if there is a memory leak.
The problem is that the heapdump only turned out to be 317 MB and nothing in it looks out of the ordinary, so I'm stuck with debugging. I've also run it with nodetime, which says that the V8 heap usage is around 400 MB, but the total V8 heap size is 1.4 GB.
How do I find out where the remaining 1 GB comes from?
Maybe node-memwatch could help you?
https://github.com/lloyd/node-memwatch
From its Readme: