Not every disk-pressure event is a distributed accumulation. Sometimes it’s one 60 GB file: an Exim mainlog that nobody rotates, a debug log left on after a one-off troubleshooting session, an .iso a customer uploaded “to test something” and then forgot about.
What’s happening
A single oversized file is usually the result of misconfigured rotation, abandoned debugging, or a feature that grew without bounds. On cPanel, the common offenders are /var/log/exim_mainlog, /var/log/maillog, customer-side error logs in /home/<user>/public_html/error_log, and PHP-FPM slowlogs.
How to verify
find / -xdev -type f -size +500M 2>/dev/null
find /var/log -type f -size +1G 2>/dev/null
ls -lh /home/*/public_html/error_log 2>/dev/null | sort -k5 -h | tail
lsof | awk '{print $7, $9}' | sort -rn | head
lsof catches files still held open by a daemon — a deleted file held by Exim or MySQL shows up here and won’t be freed until the process closes the handle.
The fix
- Truncate, don’t delete, files held open by daemons:
: > /var/log/exim_mainlogclears the content without invalidating the open file handle.rmfollowed by the file recreating would lose log lines until rotation. - Rotate properly. Check
/etc/logrotate.d/— there should be entries forexim,cpanel, and each major application. Missing entries are how files reach 60 GB. - PHP error logs in
/home/<user>/public_html/error_logaccumulate per-account and rarely rotate. Truncate them (: > error_log) after archiving any recent entries the customer might need. - PHP-FPM slowlogs are useful for diagnosis but should not be left enabled. After troubleshooting, set
slowlog_timeout = 0in the pool config. - Stray archives in
/home/<user>:find /home/<user> -name '*.tar.gz' -size +500M. Customer uploaded an archive for migration and never deleted it — ask before removing, but most are forgotten.
Stack Harbor maintains log rotation and disk hygiene under cPanel server administration.