I have one automated test that looks for memory leaks. Basically I do some operation a *lot* of times and record the memory usage over time. I then analyse the results and calculate the relative standard deviation to decide it it's a leak or not.
https://github.com/c9/smith/blob/master/tests/test-memory-leaks.js As far as finding what is leaking, the best tool I've seen is the flame-graph. But as I understand it only works on dtrace enabled systems. On Mon, Aug 27, 2012 at 3:13 PM, Martin Wawrusch <[email protected]> wrote: > Hi all, > > we have a bad memory leak (objects not being freed for whatever reason) in > one of our API express based services, what's the best way to debug this > (best = fastest way to detect the culprit), and also how can we > automatically test this (we are using mocha, so that would be preferred). > > Any ideas, blog posts, etc would be very welcome. > > Martin > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
