Latency spikes though CPU usage looks low (50%).
AdvancedScenarioLimits, logging, health checks and restarts
Answer
Situation read → CFS throttling can occur in bursts even at modest averages.
What I'd do → Check cat /sys/fs/cgroup/cpu.stat inside the container (cgroup v2) for nr_throttled and throttled_usec. Raise or remove the CPU limit, use --cpu-shares/requests only, or tune the app's thread pools to match --cpus.
Why → A multi-threaded app can burn its 100 ms quota in 20 ms and then stall.
Interview tip → Many teams set requests but no CPU limits for this reason.
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?Beginner`docker logs` is empty but the app is running.BeginnerConfigure log rotation globally.BeginnerShip container logs to a central system.IntermediateDefine a good restart policy for a production service.Beginner