Sunday 26 May 2019

Doing Heapdumps safely on Production servers?

Let's say we have a node.js running in production server that grew from 100mb to 1GB, and we want to figure out if there's any leak. Is there a way to figure out memory leaks without having signficant performance impact on server? The way I would do it on a development server is by taking heapsnapshots on the process and doing a comparison analysis between profiles. The problem doing this in production is that it would actually making the node.js process unresponsive for several seconds (especially if the memory is large). Apparently, node.js fork doesnt support shared-memory as well, so one can't simply fork for an existing process, and do a heapdump analysis there.​How do you guys hunt node.js memory leaks safely in production servers? Do you just use the chrome console, and inspect program state manually? Or do you guys just accept the fact the server would just have to be unresponsive for a while and heapsnapshots should be taken sparingly.

Submitted May 26, 2019 at 02:17PM by simpleyuji

No comments:

Post a Comment