📖 ~1 min read
Table of contents
Symptom & Impact
Applications terminate unexpectedly as kernel OOM killer reclaims memory.
Environment & Reproduction
Typical during traffic bursts, memory leaks, or undersized VM allocations.
cat /etc/os-release
free -h
dmesg | grep -i 'killed process'
Root Cause Analysis
Total memory pressure exceeds available RAM and swap capacity.
Quick Triage
Identify top memory consumers and recent OOM events.
ps -eo pid,cmd,%mem,rss --sort=-%mem | head
journalctl -k | grep -i oom | tail -n 50
Step-by-Step Diagnosis
Measure trend growth and confirm whether leak is process-specific.
vmstat 1 10
pmap -x PID | tail -n 1
cat /proc/meminfo

Solution – Primary Fix
Add swap, tune service memory limits, and restart leaking services.
Still having issues? Our Managed IT Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile && sudo swapon /swapfile
sudo systemctl restart SERVICE

Solution – Alternative Approaches
Scale memory resources or split workload tiers.
sudo systemctl set-property SERVICE MemoryMax=2G
Verification & Acceptance Criteria
No new OOM events and memory headroom remains stable.
free -h
swapon --show
journalctl -k | grep -i oom | tail
Rollback Plan
Disable temporary swap file if it impacts IO performance goals.
sudo swapoff /swapfile
sudo rm -f /swapfile
Prevention & Hardening
Add memory monitoring and enforce application-level limits.
systemctl show SERVICE -p MemoryCurrent,MemoryMax
Related Errors & Cross-Refs
Related logs include out of memory kill process and memory cgroup out of memory.
Related tutorial: View the step-by-step tutorial for Debian 12.
View all Debian 12 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Linux OOM behavior and Debian memory management guidance.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.