Stop guessing why your containers are hitting invisible memory ceilings
Container Basics On Linux (Namespaces/Cgroups)
Stop guessing why your containers are hitting invisible memory ceilings
🧩 The Challenge
You know that feeling when your container hits a memory limit and just dies, but the logs don’t show an OOM error? I’ve spent way too many nights chasing phantom crashes that were actually just the kernel silently killing the process because it hit a cgroup limit.
💡 The Fix
Check the memory controller stats directly on the host to see if you are actually bumping into the hard limit. It saves you from digging through application logs that weren’t even written yet.
cat /sys/fs/cgroup/memory/system.slice/docker-<container_id>.scope/memory.failcnt
⚙️ Why It Works
The failcnt file tracks exactly how many times the process tried to exceed its cgroup quota, which gives you a definitive answer whether the kernel dropped the hammer on you.
🚀 Pro-Tip: If that number is ticking up, go bump your memory limit before the service tries to allocate again.
Linux Tips & Tricks | © ngelinux.com | 9/8/2026
