Interview Prep/Docker/Resources, health checks, logging and restarts

`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.

All Docker questions Roadmap: Docker & containers

More on Resources, health checks, logging and restarts