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
Exit Codes and Signals in CI/CD: A Practical GuideA practical guide to process exit codes and signals in CI/CD - what 1, 2, 124, 126, 127, 130, 137, and 143 me…
CI Exit Code Lookup: What Does This Exit Code Mean?Instant lookup for CI/CD process exit codes - enter a code (137, 127, 143…) to see what it means, whether it…
Node.js "JavaScript heap out of memory" in CI - Fix FATAL Heap ErrorsFix "FATAL ERROR: Reached heap limit - JavaScript heap out of memory" in CI builds by raising the V8 heap lim…
Self-Healing CI: Recovering from OOM-Killed Jobs (Exit 137)Out-of-memory kills (exit 137) are mechanical, not code bugs. See the manual fix and how self-healing CI auto…