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

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.

All Docker questions Roadmap: Docker & containers

More on Resources, health checks, logging and restarts