Application hangs and logs stop: log driver blocking (`fluentd: connection refused`).
AdvancedTroubleshootingResources, health checks, logging and restarts
Answer
Likely causes → Default blocking log mode: when the remote log endpoint is unavailable, writes to stdout block the app.
Diagnose → docker inspect -f '{{.HostConfig.LogConfig}}' c; strace -p <pid> shows write(1, ...) blocked; check collector.
Fix → --log-opt mode=non-blocking --log-opt max-buffer-size=4m; restore the collector.
Prevent → Use a local collector tailing files rather than direct network drivers.
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