Killed / Out of memory: Killed process (Linux OOM killer)
The kernel ran out of memory and killed a process to recover — the program just prints “Killed” (exit code 137).
Out of memory: Killed processinvoked oom-killerexit code 137 Meaning
When RAM and swap are exhausted, the OOM killer picks the biggest process and sends SIGKILL. There’s no stack trace; the evidence is in the kernel log. Small VPSs without swap hit this during builds (npm, Composer, webpack) and database spikes.
Common causes
- Server has too little RAM / no swap
- Memory-hungry build steps (webpack, tsc, Composer)
- Memory leak in a long-running process
- Too many worker processes (PHP-FPM, Gunicorn) for the RAM
⚡ Quick fix
- Confirm:
dmesg -T | grep -i -E "killed process|oom" - Add swap on small servers
- Reduce workers / limit process memory
- Build on CI instead of the production server
Detailed fix by platform
Linux
- Add a 2 GB swap file:bash
sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile sudo mkswap /swapfile && sudo swapon /swapfile echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab free -h
How to diagnose
- Kernel log — dmesg / journalctl -k for OOM entries
- Victim — Which process and how big?
- Capacity — RAM, swap, worker counts
🔧 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
- 0xC0000005 The application was unable to start correctly (0xc0000005) / Exception code 0xc0000005 access violation
- AddressSanitizer: heap-buffer-overflow C/C++: ==ERROR: AddressSanitizer: heap-buffer-overflow on address — READ/WRITE of size N
- AddressSanitizer: heap-use-after-free C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free
Most viewed in Linux
- System has not been booted with systemd System has not been booted with systemd as init system (PID 1). Can't operate.
- Repository does not have a Release file E: The repository '...' does not have a Release file
- Start request repeated too quickly systemd: Start request repeated too quickly / service hit its start limit
Where this error sits
Origin: Platform & cloud. 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 14 Oct 2026