How do you detect and profile memory leaks in Node.js servers?
expand_more
node --inspect index.js. Connect Chrome DevTools to the Node process, take Heap Snapshots under the Memory tab, and compare snapshots before and after sending mock traffic using load testers (like autocannon) to identify growing constructor instance counts.