Skip to main content

What happens if a container uses more memory than allowed by cgroup?

Mid Docker
Quick Answer The cgroup OOM (Out of Memory) killer terminates the container's process. Docker captures this and marks the container as exited with an OOM error. If the container has a restart policy, Docker restarts it รขโ‚ฌโ€ potentially in a loop if the memory limit is genuinely too small. Increase the limit or optimize the app's memory use.

Answer

The kernel OOM killer terminates the container, logged as OOMKilled.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice