We have a memory leak that is causing our Node server to run out of process memory. What are some suggestions / tools that would help us debug this?
1 Answer
Are you running the latest and greatest node.js v0.3.8?
But I believe you might be able to detect leaks with https://github.com/dannycoates/node-inspector.
6 Comments
Chetan
We're running v0.3.5. Thanks for the node-inspector link!
Alfred
@chetan you found the memory leak? If so, could you please post the code that was leaking for use people, who also are experiencing leaks and how you detected the leak! Thank you :P
Chetan
@Alfred: Haven't found it yet :/ Still working on it. I will post an update to this question when I find it.
Alfred
O that's too bad! Because you accepted my answer :P. Then I guess you should unaccept my answer ;) .....
Vanwaril
We found the leak, though it didn't have anything to do with node in general -- it seems to have to do with the way node-mongodb-native handles either the variables or callbacks passed to it, though I couldn't find the actual culprit. We fixed the leak by ensuring the variables that went to node-mongodb were in a smaller scope.
|