Limits seem ignored: `WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.`
AdvancedTroubleshootingResources, health checks, logging and restarts
Answer
Likely causes → Swap accounting disabled in the kernel (common on Debian/Ubuntu defaults).
Diagnose → docker info | grep -i swap; cat /proc/cmdline.
Fix → Add cgroup_enable=memory swapaccount=1 to GRUB (cgroup v1), or use cgroup v2 where it works; update-grub and reboot.
Prevent → Standardise kernel parameters in the host image.
More on Resources, health checks, logging and restarts
Container restarts repeatedly: `docker ps` shows `Restarting (1) 5 seconds ago`.Beginner`OOMKilled: true` and exit code 137.BeginnerContainer is `unhealthy` but the app works when tested manually.Intermediate`docker stats` shows 100%+ CPU and the container is slow.Intermediate`docker logs` is slow or `docker logs -f` hangs on a container with huge logs.Intermediate`Error response from daemon: configured logging driver does not support reading` when running `docker logs`.Intermediate