Tracking Down a Memory Leak
summary
Demonstrates finding a real Node.js leak by using Chromium DevTools allocation timeline and heap snapshot comparisons to spot large retained sizes, locates a deliberate Fastify example kept in an eager cache, and traces references in the retainers view. Notes a historical browser leak of 4 gigabytes, shows using process/v8 hooks to write snapshots in production (with risk of running out of memory), and points to an express-session example repository that reproduces a non-obvious library leak.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:31JavaScript memory basics
- 4:21Garbage collection process
- 8:00GC generations and scheduling
- 10:44Compacting and shapes
- 12:22Memory management techniques
- 16:28Common misconceptions
- 19:42Advanced memory management
- 22:24Identifying memory leaks
- 25:27Streams and browser leaks
- 27:03Memory debugging tools
- 31:10Debugging demo
- 35:55Heap snapshots analysis
- 39:43Production debugging
related talks
24mDemystifying Memory Leaks in JavaScript
35mMemory Chronicles: Manage, Trace and Fix Memory Leaks
38mUnderstanding Memory Behavior on Nodejs
33mMemory Profiling for Mere Mortals
28mMemory Profiling for Mere Mortals
43mFinding memory leaks and CPU bottlenecks with Node.js debug tools
24mTrash Talk - Understanding Memory Management
39mWelcome to Mordor! Hunting Performance Issues in Node js
