Skip to content

Instantly share code, notes, and snippets.

View jmfury's full-sized avatar

Jimmy Merritello jmfury

View GitHub Profile

Debugging Memory Issues in Node

This guide summarizes some helpful strategies and resources encountered while debugging memory usage in the hashicorp/learn repository.

Diagnosing memory issues

In JS, memory issues occur when old objects aren't garbage collected, and pile up on the heap. We can observe the issue by noting performance degradation over time, or by maxing out memory within a single program.

Typically memory issues are discovered because performance slows down. You might also encounter this fun error if your program runs out of memory: