Skip to content
Latchkey

Exit Code 247 in CI: Node.js Out-of-Memory Abort Explained

Exit code 247 frequently appears when a Node.js / V8 process aborts on heap exhaustion in CI.

A step exiting 247 commonly means Node hit its heap ceiling and aborted - distinct from a kernel OOM-kill (137), which comes from outside the process.

What it means

Node/V8 can abort with a non-standard high exit code such as 247 when it runs out of heap (an internal allocation failure). It signals memory pressure inside the runtime rather than the OS killing it.

Common causes

  • A large build or test run exceeding the default V8 heap.
  • A memory leak accumulating across a long run.
  • Bundling or source-map generation on a huge graph.

How to fix it

Raise the heap with --max-old-space-size, lower parallelism, or split the work. Because this is a mechanical resource exhaustion, Latchkey treats it as a transient class and retries with more memory automatically.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →