Identify the exhausted scope
Linux can invoke OOM handling that terminates a process under memory pressure. The relevant exhaustion can be machine-wide or inside a cgroup limit. Apparent spare physical capacity does not rule out a local memory boundary affecting one workload.
Identify the process, termination time, cgroup and configured limits together. A free-memory sample taken later or outside the container’s resource scope cannot establish what happened at failure time. Both the time of observation and the resource domain being measured are essential parts of the evidence.
Exit status is only one clue
An exit code such as 137 commonly points toward SIGKILL in a container context, but it does not uniquely establish OOM. An administrator or another mechanism can also send that signal. Correlate the exit with kernel and container-runtime records.
For cgroup v2, changes in memory.events can help. If a field is cumulative, compare it before and after the incident instead of interpreting any nonzero value as proof of the current failure. Evidence should identify the same workload and time window, not merely show that an OOM event once occurred.
Bound a peak-allocation workload
Loading an entire input file and simultaneously retaining a transformed array can create a peak much larger than the file’s size. Account for expanded representations and overlapping copies rather than using input bytes as a complete memory estimate.
Streaming, chunking and concurrency limits can reduce the peak. A job that fits alone may fail when several jobs overlap, so include simultaneous operations and unusually large inputs in testing. State the workload bounds under which the proposed configuration is expected to fit rather than relying only on an average-size success case.
Distinguish peaks from retention
A temporary peak that falls after work ends and a leak that grows across completed jobs require different repairs. Raising a limit can postpone either symptom without proving that the cause was fixed. Record memory over time together with operation size and concurrency.
Automatic restart can also repeat the same failure if it reprocesses the same oversized input under the same limits. Observe restart counts, unfinished work and retry load. Recovery behavior should restore useful progress, not repeatedly allocate the same impossible workload and consume the capacity of neighboring services.