OOM killer Linux Origin: Platform & cloud Last updated 14 Oct 2026

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).

Exact message you may see Out of memory: Killed processinvoked oom-killerexit code 137
Seen on: Linux

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

  1. Confirm: dmesg -T | grep -i -E "killed process|oom"
  2. Add swap on small servers
  3. Reduce workers / limit process memory
  4. Build on CI instead of the production server

Detailed fix by platform

Linux

  1. 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

  1. Kernel log — dmesg / journalctl -k for OOM entries
  2. Victim — Which process and how big?
  3. 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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

0xC0000005 — The application was unable to start correctly (0xc0000005) / Exception code 0xc0000005 access violation (Windows)0xC0000005AddressSanitizer: heap-buffer-overflow — C/C++: ==ERROR: AddressSanitizer: heap-buffer-overflow on address — READ/WRITE of size N (C/C++)AddressSanitizer: hea…AddressSanitizer: heap-use-after-free — C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free (C/C++)AddressSanitizer: hea…Allowed memory size exhausted — PHP Fatal error: Allowed memory size of X bytes exhausted (PHP)Allowed memory size e…Bus error — C/C++: Bus error (core dumped) — SIGBUS from misaligned access or a bad memory-mapped file (C/C++)Bus errorCannot allocate memory — fork: Cannot allocate memory / ENOMEM (Linux)Cannot allocate memoryComposer memory — Composer: PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (PHP)Composer memorydouble free or corruption — C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped) (C/C++)double free or corrup…OOM killer

Explore the map of this error Full error map →

🧠 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.