Node Underground
Node Underground
Sep 11, 2021 · Backend Development

Why Node.js vm Triggers OOM in V8: Hidden Compilation Cache Pitfalls

This article explains how frequent use of Node.js's vm module can cause out‑of‑memory crashes in V8 due to an uncollected compilation cache, the role of the --always‑promote‑young‑mc flag, and practical work‑arounds for Node.js 12, 14 and 16.

Compilation CacheMemory LeakNode.js
0 likes · 16 min read
Why Node.js vm Triggers OOM in V8: Hidden Compilation Cache Pitfalls