Memory not released after load; `docker stats` stays high.
AdvancedTroubleshootingResources, health checks, logging and restarts
Answer
Likely causes → Allocators (glibc arenas, JVM) hold memory, page cache is included, or a real leak.
Diagnose → docker exec c cat /sys/fs/cgroup/memory.stat | head -20 (anon vs file); heap dumps.
Fix → Tune allocator (MALLOC_ARENA_MAX=2, jemalloc), cap heap; fix the leak if anon grows steadily.
Prevent → Soak tests with memory graphs.
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