`/var/log/app/app.log` is 180 GB even though logrotate is configured daily, and the disk is about to fill.

IntermediateTroubleshootingDisk, memory and CPU
Answer

Likely causes → Logrotate isn't running or isn't working: the cron/timer is disabled, the config has a syntax error so the whole file is skipped, or rotation happens but the app keeps writing to the renamed file because nobody signals it to reopen.

Diagnose →

systemctl status logrotate.timer
sudo logrotate -d /etc/logrotate.d/app      # dry run shows errors
cat /var/lib/logrotate/status | grep app
ls -lh /var/log/app/

Fix → Truncate the live file to free space now (: > /var/log/app/app.log), fix the config, and run logrotate -f /etc/logrotate.d/app. Example:

/var/log/app/*.log {
  daily
  rotate 7
  compress
  missingok
  maxsize 1G
  copytruncate
}

Prevent → Ship logs to a central system and keep only a few days locally, add maxsize so rotation triggers on size, and investigate why the app is logging so much (debug level left on in production).

All Real-World Interview questions Roadmap: Interview readiness

More on Disk, memory and CPU