Founding prices until 15 December: 30% off Pro, locked for life. See pricing

$ … Out of memory: Killed process

'Out of memory: Killed process': the Linux OOM killer

The system ran out of memory and the kernel killed the process using the most.

Linux

What it means

When memory and swap run out, the kernel's OOM killer picks a process (usually the biggest) and kills it with SIGKILL. The process just disappears; the record is in the kernel log. In a container, the limit is the cgroup's, not the machine's.

Causes and fixes

Most likely first. Run the check, and if it matches, apply the fix.

1. One process grows without bound (a leak, an unbounded cache or queue)

Check:

dmesg -T | grep -i -E 'killed process|out of memory'
ps aux --sort=-rss | head

Fix: Fix the leak; cap the process with a systemd MemoryMax or container limit so it alone dies, not the whole machine.

2. Too much running for the machine's memory

Check:

free -h; cat /proc/pressure/memory

Fix: Move workloads, add memory, or set limits; add swap only as a buffer.

Fix it yourself

A live machine in your browser with this problem already on it. The grader checks the result.

Open the lab

No account needed for your first tries.

Related errors