Rotate or cap per-account PHP error logs
Open Discussion
Each SPanel account writes PHP errors to its own ~/php_error.log, and nothing rotates or caps it. On our server, logs on two WordPress sites reached 2.3 and 2.6 GB, and a debug log on a third reached 3.5 GB, before anyone noticed. Old themes and plugins logging the same PHP 8 warnings on every page load were enough to do it. Left alone, a log like that can fill the disk and take down every site on the server.
I’d like the per-account PHP error logs handled the same way as the Apache logs:
- Rotate them on a schedule or when they reach a set size, keeping a set number of compressed copies.
- Let the server admin set the size and retention for the whole server, with a per-account override.
- Optionally, show each account’s log size in SPanel or send an alert when a log passes a set size, so a runaway log gets noticed before it becomes a disk problem.
Scala support confirmed on ticket #117347 that these logs aren’t rotated today and suggested posting the request here.
Comments (0)
Replies have been locked on this page!