Troubleshooting
A Linux host has 40 GB of free memory. A Java application running in a container is repeatedly terminated and restarted. docker inspect shows OOMKilled as true, and dmesg contains 'Memory cgroup out of memory: Killed process' entries. Which is the most likely cause?
Show the answer
Correct answerA. The container's memory limit is lower than the application's peak memory use
A 'Memory cgroup out of memory' message means the process hit its own cgroup memory limit, so the OOM killer acted even though the host has plenty free. Host-wide exhaustion is the tempting answer, but that would produce a global OOM message and little free memory.