Bug #7198
closednginx-error.log is not circular and can fill filesystem
100%
Description
Unlike almost all of the other log files contained in /var/log, nginx-error.log is not circular. Because it grows linearly, in the event of an error condition that spams this log file, nginx-error.log can grow to fill the entire filesystem.
I experienced this condition as triggered by bug #6318 on an embedded system with /var mounted as a RAM disk. Normal /var usage for this system was around 40%, but after hitting the issue described in bug #6318, nginx-error.log filled with dozens of errors every second and grew to fill /var up to 100%. Once /var was full, this resulted in a cascading failure of all of the other processes that rely on storage in /var, which effectively brought the whole system to a halt. Console access was required to clean up and resolve this issue, though a reboot would have also fixed it by clearing the RAM disk.
If /var/log/nginx-error.log were stored in clog format, this system failure could have been avoided. Unless there is a good reason to make an exception, I would think this log file should be stored in the same clog format as the other log files in /var/log.