Affected versions: CentOS Stream 10

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Critical services are killed unexpectedly; dmesg shows ‘Out of memory: Kill process’.

Environment & Reproduction

Memory-heavy workloads without limits on small VMs.

free -h
dmesg | grep -i 'killed process' | tail

Root Cause Analysis

Total RSS exceeded available memory and the OOM killer reaped a high-score victim.

Quick Triage

Identify the killed process and current memory pressure.

journalctl -k | grep -i oom
ps -eo pid,rss,comm --sort=-rss | head

Step-by-Step Diagnosis

Profile workload memory and check cgroup limits.

systemd-cgtop -n 1
cat /proc/meminfo
Illustrative mockup for centos-stream-10 — oom_kill
OOM kill in dmesg — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Add swap and apply systemd memory limits to runaway services.

Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

fallocate -l 4G /swap1 && chmod 600 /swap1 && mkswap /swap1 && swapon /swap1
systemctl set-property myservice.service MemoryMax=2G
Illustrative mockup for centos-stream-10 — oom_fixed
Swap and limits added — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Move the workload to a larger instance if limits hurt SLAs.

echo 'Resize the VM or container memory class via cloud console / virsh setmem.'

Verification & Acceptance Criteria

No new OOM events under load.

journalctl -k --since='1 hour ago' | grep -i oom

Rollback Plan

Disable the swap file and revert MemoryMax.

swapoff /swap1
systemctl set-property myservice.service MemoryMax=infinity

Prevention & Hardening

Set MemoryMax for all hungry services and monitor pressure.

Automate patch management and compliance across your fleet with our DevOps services.

for s in $(systemctl list-units --type=service --state=running --no-legend | awk '{print $1}'); do systemctl show $s -p MemoryMax; done

OOM killer messages, segfaults under load.

Related tutorial: View the step-by-step tutorial for centos-stream-10.

View all centos-stream-10 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Linux memory tuning notes, systemd resource control.

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.