Project

General

Profile

Actions

Bug #7198

closed

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

Added by Brett Keller almost 8 years ago. Updated almost 5 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

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.

Actions #1

Updated by Jim Pingle about 5 years 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.

Actions #2

Updated by Jim Pingle almost 5 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100
  • Affected Version changed from 2.3.2 to All
  • Affected Architecture All added
  • Affected Architecture deleted ()

nginx-error.log is no longer referenced or used. nginx.log is being rotated as expected:

-rw-------  1 root        wheel       361753 Jan  6 15:33 nginx.log
-rw-------  1 root        wheel         8759 Jan  6 14:43 nginx.log.0.bz2
-rw-------  1 root        wheel         8742 Jan  6 13:29 nginx.log.1.bz2
-rw-------  1 root        wheel         8686 Jan  6 12:15 nginx.log.2.bz2
-rw-------  1 root        wheel         8506 Jan  6 11:01 nginx.log.3.bz2
-rw-------  1 root        wheel         8834 Jan  6 09:47 nginx.log.4.bz2
-rw-------  1 root        wheel         8764 Jan  6 08:33 nginx.log.5.bz2
-rw-------  1 root        wheel         8744 Jan  6 07:19 nginx.log.6.bz2

Actions

Also available in: Atom PDF