

Debugging Node.js memory leaks - jakerella86
http://blog.flowdock.com/2015/06/22/debugging-node-js-memory-leaks/

======
conorgil145
Other links relating to debugging memory related issues in NodeJS which I have
bookmarked (in no particular order):

* [http://www.willvillanueva.com/the-node-js-profiling-guide-th...](http://www.willvillanueva.com/the-node-js-profiling-guide-that-hasnt-existed-finding-the-cause-of-a-memory-leak-using-heap-snapshots-part-3/)

* [https://github.com/felixge/node-memory-leak-tutorial](https://github.com/felixge/node-memory-leak-tutorial)

* [https://strongloop.com/strongblog/node-js-performance-tip-of...](https://strongloop.com/strongblog/node-js-performance-tip-of-the-week-memory-leak-diagnosis/)

* [https://github.com/bnoordhuis/node-heapdump](https://github.com/bnoordhuis/node-heapdump)

* [http://www.nearform.com/nodecrunch/self-detect-memory-leak-n...](http://www.nearform.com/nodecrunch/self-detect-memory-leak-node/)

------
schmichael
Some great lessons in this post:

* open()/close() (in other words: resource management) are as likely to cause leaks as malloc()/free() (aka memory management)

* Single threaded code can have race conditions

* No single tool (debugger, heap profiler, logging, etc) will be a panacea for troubleshooting production

------
daveidol
Great post- thanks for the writeup!

I would love to see a post detailing some best practices, or even
comprehensive setup guides, for instrumenting a full Node.js service. So far
most of the information I've seen is very limited in scope and specific to
just one aspect of the bigger picture.

