Apply for Free VPS

Diagnose memory pressure and out-of-memory kills

Updated 27 Nov 2026 memory oom

Read memory figures correctly and find why the system stopped a process.

Read the figures

free -h

Look at available, not "free": Linux uses spare memory as cache and gives it back when needed.

Was something killed?

sudo journalctl -k | grep -i -E "out of memory|oom-kill"
sudo dmesg -T | grep -i "killed process"

Who uses most?

ps -eo pid,rss,comm --sort=-rss | head -12

rss is in kilobytes.

Is it swapping?

vmstat 5 5

Steady non-zero si and so columns mean the server is short of memory, and on a hard disk performance suffers badly.

Fix

  1. Limit worker counts in your web server and application.
  2. Reduce database buffers to suit the server.
  3. Set MemoryMax= on services and memory limits on containers.
  4. Add swap as a safety net.
  5. Look for leaks: memory that rises until restart.
  6. Upgrade if the workload truly needs more.

Was this helpful?

Report outdated or incorrect information