ArmSoM
← All stories

Why a Container Is Killed While the ArmSoM Host Still Has RAM

A service can be killed within a cgroup memory limit while the rest of an ArmSoM Linux system has memory available. Raising the limit blindly can move the failure to another service. Identify the boundary that was reached first.

ArmSoM Sige7 single-board computer product photo

ArmSoM Sige7 single-board computer · ArmSoM

Read the counters from the affected cgroup

On a cgroup v2 system, locate the service's cgroup and inspect memory.max, memory.current and memory.events. Capture changes across a representative request, including any change in the oom_kill counter. Compare those events with kernel logs and the container runtime's exit status. Also inspect the configured limit on a parent cgroup when the service's own limit appears unrestricted.

Observation

Next evidence to inspect

Service stopped, host has headroom

Configured service and parent cgroup limits

oom_kill counter rose during request

Kernel log and runtime exit record from that interval

Counter stayed constant

Investigate other exit causes before changing memory limits

Take a counter snapshot before the test. A nonzero historical oom_kill value alone cannot associate the current failure with that limit. Look for a change during the exact request.

If request concurrency drives the peak, test a smaller concurrency limit alongside a larger memory allowance. Measure both memory headroom and requests completed by their deadline.

How to distinguish a leak from overlapping requests

Run one fixed request at a time and record the memory high point and the level after completion. Then repeat at the intended concurrency. If the post-request baseline rises with each serial request, look for retained buffers or an accumulating cache. If serial requests return to a stable baseline but overlapping requests cause kills, investigate the memory required per in-flight job and the maximum queue depth.

Record the lowest concurrency that reproduces the failure. This produces an immediately usable mitigation candidate while the team decides whether to reduce per-job memory or change the service limit. Retain headroom for other workloads on the host.

Reference material

ArmSoM Sige7 hardware documentation

Linux control group v2 memory interface

Related ArmSoM guide

Choosing ram for an arm SBC measure the complete workload

Explore ArmSoM Sige7