--max-old-space-size

A V8 option, passed to node, that sets the maximum size in megabytes of old space, the largest part of the JavaScript heap.

In more detail

When old space reaches the limit and garbage collection cannot free enough, the process crashes with a "JavaScript heap out of memory" error. In a container, set it somewhat below the container memory limit so V8 collects garbage harder before the kernel's OOM killer steps in.

Related terms

Taught in

References