High load, OOM and resource limits
Quick answer
High load, a killed process and a failed allocation are symptoms, not diagnoses. Correlate pressure, process state, resource limits and evidence from the affected environment.
A process can hit a cgroup memory limit even when the host still has available memory. Distinguish host pressure, local limits and application failures using time-aligned evidence. A killed process alone is not enough to prove the cause was out-of-memory handling.
Prepare the practice environment
Run python3 lab-fixtures/troubleshooting/setup.py from the extracted root as an ordinary user. Enter the printed fresh private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. Run each snippet in a separate Bash process, not your interactive shell. Only private files are used; optional examples require an authorized snapshot VM. Do not change live services, mounts, policies or resource limits. All supplied records are fictional; no host incident records are collected. Review the lab guide.
Prerequisites
Review: SSH and mandatory access denials.
How it works
Compare load with effective CPU capacity, vmstat runnable and blocked tasks, and memory availability and PSI. A zombie has exited but has not yet been reaped by its parent; signaling it cannot make it exit again. Investigate its parent safely. An exit status of 137 often reflects SIGKILL under shell convention, but does not establish OOM; administrators or timeouts can also send SIGKILL. Inspect authorized kernel or service logs and the relevant cgroup v2 memory.events counters before and after the incident. oom_kill counts processes in the cgroup killed by an OOM killer; hierarchical counters may include descendants. A limit can cause memory failure even if the host has available memory. File descriptor exhaustion can produce EMFILE at a process limit or ENFILE at a system-wide limit; inspect the relevant process limits, not only the current shell. In a real incident reduce load or fix the leak, then adjust capacity only after measurement and approval. Preserve previous limits for rollback, verify bounded workload and error rates, and add monitoring. Never intentionally trigger OOM on a shared system.
Try the examples
The model detects a counter increase within the same fictional cgroup. Correlate timestamps and process identity before attributing a specific death.
Expected stdout:
oom_kill increased by 1Columns are PID, state and PPID. The parent 10 needs investigation; do not send signals to these fictional IDs.
Expected stdout:
42 Z 10A short-lived child Python process lowers only its own soft limit and opens /dev/null a bounded number of times. All descriptors close in finally.
Expected stdout:
EMFILE at private process limit; descriptors closedCommon mistakes
Exit 137 alone is not evidence of OOM. Do not raise limits or kill arbitrary processes until the affected resource and owner are known.
Practice
Compare the fictional memory.events snapshots and process sample. Run the bounded descriptor test and explain how to distinguish a per-process limit from global exhaustion.
Related references
Study: free, ps, vmstat. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
High load, OOM and resource limits — Knowledge Check
Apply troubleshooting concepts to synthetic fixtures and VM-only scenarios.
Does exit 137 prove OOM?
What is a zombie process?
Which error indicates a per-process descriptor limit?
A cgroup OOM can happen when host memory is available. Why?