Affected versions: Ubuntu 22.04 LTS Ubuntu 22.04 Ubuntu 22.04.4

πŸ“– ~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

Processes are killed by OOM despite moderate average workload.

Environment & Reproduction

Often appears on small VMs where swap was removed or never configured.

Root Cause Analysis

No swap capacity exists to absorb memory spikes and reclaim pressure.

Quick Triage

Confirm OOM events and current virtual memory tuning.

Step-by-Step Diagnosis

Measure memory pressure and identify top consumers.

Illustrative mockup for ubuntu-22-04-lts β€” terminal_or_console
Diagnosis commands for post 168 β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Create swapfile, secure permissions, enable it, and persist in fstab.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-22-04-lts β€” log_or_dashboard
Fix validation evidence for post 168 β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Resize RAM or tune application memory limits if swap is not permitted.

Verification & Acceptance Criteria

Swap is active and OOM kill events stop under normal peaks.

Rollback Plan

Disable and remove swapfile if workload requires swapless policy.

Prevention & Hardening

Set baseline swap for all server classes and alert on memory pressure.

Related to Out of memory Kill process and cgroup memory limit events.

Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.

View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Ubuntu 22.04 swapfile configuration and memory management docs.

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.