advancedScenario-Based & System Design Questions
A containerized application logs heavily to stdout, and after a few weeks the production host runs out of disk space even though no large files were intentionally written.
Diagnose by checking accumulated container log file sizes on the host (`docker inspect` shows the log path; `du` on it directly) — the root cause is almost always missing log rotation configuration. Fix by setting `log-opts: max-size` and `max-file` on the daemon or per-container/Compose service, and ensure centralized logging is in place so on-host retention can be kept minimal.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response