GitHub Actions: Error: Process completed with exit code 137 (Killed — out of memory)
The command was killed by the system with SIGKILL (128 + 9), almost always because the runner ran out of memory.
Process completed with exit code 137exit code 137 Killed##[error]Process completed with exit code 137Killed signal 9 GitHub ActionsThe process was killed (exit code 137) Meaning
Hosted runners have limited RAM (7 GB on standard Linux). Builds, bundlers (webpack, Gradle), test suites and Docker builds can exceed it. The log often ends with "Killed". Reduce parallelism, raise memory limits for the tool, use a larger runner, or split the work.
Common causes
- Out of memory during build or tests (webpack, tsc, Gradle, Maven)
- Too many parallel workers/jobs
- Memory leak in a long-running test run
- Docker build using huge layers or parallel stages
- Process killed by a timeout script (
kill -9)
⚡ Quick fix
- Lower parallelism (
--maxWorkers=2,--jobs 2) - Set the tool's memory limit (
NODE_OPTIONS=--max-old-space-size=4096) - Use a larger runner or split the job
Detailed fix by platform
GitHub Actions
env: NODE_OPTIONS: --max-old-space-size=4096andrun: npm test -- --maxWorkers=2- Add a swap step on Linux runners if needed
Linux
free -manddmesg | tailat the end of the job show memory pressure
Code examples
Reduce memory pressure
- name: Build
env:
NODE_OPTIONS: --max-old-space-size=4096
run: npx tsc --noEmit && npx webpack --mode production
- name: Show memory
if: always()
run: free -mHow to diagnose
- Tool — Which step was killed?
- Memory — free -m usage?
- Parallelism — Workers/jobs running at once?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- API rate limit exceeded GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit
- Container exceeded memory limit Bitbucket Pipelines: Container 'Build' exceeded memory limit / Docker container exited with code 137
- heap out of memory FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- Resource not accessible by integration GitHub Actions: Error: Resource not accessible by integration (403)
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 25 Oct 2026