Node.js Deep Debugging
summary
Five production cases and concrete fixes: high and steady RSS is explained by virtual memory behavior proven with a small C test showing freed memory stays accounted until other processes pressure RAM, no cross‑platform API fix yet (RFE against libuv). Exit race in v11 causes random crashes during shutdown; root cause is out‑of‑order resource teardown with worker/helper threads, fixed by enforcing reverse‑order cleanup and synchronizing thread shutdown using timing injection for diagnosis. Re‑piping lost data is fixed by closing the original pipe endpoint; console.log truncation is avoided by using process.stdout.write (blocking).
AI-written summary · about
chapters (6)
- 0:00Introduction and overview
- 2:21Steady state RSS issues
- 10:56Exit race conditions
- 15:11Data truncation in pipes
- 20:43Graceful Node.js shutdown
- 24:56Truncated stdio and conclusion
related talks
50mDebugging Node.js in Production
43mFinding memory leaks and CPU bottlenecks with Node.js debug tools
39mWelcome to Mordor! Hunting Performance Issues in Node js
57mTroubleshooting Node.js Applications Under the Hood
17mRunning Node.js in Production
25mNode js applications diagnostics under the hood
24mDemystifying Memory Leaks in JavaScript
22mThe Journey About How I Fixed a Bug in the Node.js Core That Affected Thousands of Packages
