Memory usage seems to grow in `docker stats` but the app is fine.
AdvancedScenarioLimits, logging, health checks and restarts
Answer
Situation read → Page cache counts toward the cgroup's usage.
What I'd do → Compare memory.current with memory.stat (anon vs file) in /sys/fs/cgroup. Newer docker stats subtracts inactive file cache. Alert on working set and OOM events, not raw usage.
Why → Reclaimable cache is freed under pressure; it isn't a leak.
Interview tip → Working set = usage minus inactive_file.
More on Limits, logging, health checks and restarts
A Java container is OOM-killed at 512 MB. Why isn't the heap the whole story?IntermediateHow do you cap CPU and memory for a container and what happens on exceed?BeginnerLatency spikes though CPU usage looks low (50%).Advanced`docker logs` is empty but the app is running.BeginnerConfigure log rotation globally.BeginnerShip container logs to a central system.Intermediate