readStreams leaking in Node
✓ Published0🌍 Public
Aalessioalex
Last edited Jun 25, 2013
Created on Jun 25, 2013
This animation shows memory leaking in a Node.js process as it repeatedly creates read streams for a 2 MB file. Over 180 streams are spawned in a loop, each printing characters to indicate lifecycle events ('o' on open, '*' on data, '$' on end). Every 5 seconds, the script forces garbage collection via `--expose-gc` and logs the process’s resident set size (RSS) in megabytes, producing a stepwise upward trend that reveals how unclosed stream handlers accumulate and prevent memory from being reclaimed. The visualization renders this growth as an animated time series, highlighting the leak’s progression over time.
AI-generated description