LinuxMid
Process killed by the out-of-memory killer
When the kernel runs out of memory it kills processes. Confirm an OOM kill in the kernel log, then reduce memory use, add memory or set limits.
What you see
- A process disappears with no error of its own
- A container exits with code
137
What it means
If the kernel cannot find enough memory for important system functions it raises an out-of-memory condition and starts killing processes to free memory. The Docker docs warn that any process can be chosen, including Docker and other important applications, and that this can bring a whole system down.
How to confirm the cause
- 1Search the kernel log for OOM events
journalctl -k -b | grep -i -e "out of memory" -e "oom"
-kshows kernel messages only,-blimits to this boot.dmesg -Talso works, and-Tprints readable timestamps. - 2Check current memory
free -h
Causes and fixes
The host has too little memory for its workload
- HOW TO TELL
- OOM events appear when load is normal.
- FIX
- Run the workload on a host with enough memory, or spread it across hosts.
One process leaks or grows without bound
- HOW TO TELL
- The same process is the victim every time.
- FIX
- Fix the leak. For containers, set a memory limit so one container cannot starve the host (
docker run --memory).
How to stop it coming back
- Load test and measure memory needs before you place an app in production, as the Docker docs advise.
- Set limits on containers and alert on memory use.
Keep going
- Runbook: OOMKilled and exit code 137
- Runbook: Pods evicted by node pressure (MemoryPressure, DiskPressure, PIDPressure)
- Cheat sheet: dmesg
- Cheat sheet: journalctl
- Lesson: the linux topic in Learn
Sources
Linux man-pages (man7.org) and the systemd manual (freedesktop.org), read 18 Nov 2026. Command options were checked against those pages.