`docker logs` is slow or `docker logs -f` hangs on a container with huge logs.
IntermediateTroubleshootingResources, health checks, logging and restarts
Answer
Likely causes → Large json-file log being read from the start.
Diagnose → ls -lh /var/lib/docker/containers/<id>/<id>-json.log.
Fix → docker logs --tail 200 -f c, --since 10m; rotate logs.
Prevent → Rotation and shipping logs to a backend.
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`Error response from daemon: configured logging driver does not support reading` when running `docker logs`.IntermediateApplication hangs and logs stop: log driver blocking (`fluentd: connection refused`).Advanced