Project

General

Profile

Bug #7198

nginx-error.log is not circular and can fill filesystem

Added by Brett Keller over 2 years ago. Updated about 1 month ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
Logging
Target version:
Start date:
02/02/2017
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.3.2
Affected Architecture:

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.

History

#1 Updated by Jim Pingle about 1 month ago

  • Status changed from New to Feedback
  • Assignee set to Jim Pingle
  • Target version set to 2.5.0

This was fixed by #9714 -- there is no longer a dedicated nginx error log, it's all in nginx.log which now has rotation.

Also available in: Atom PDF