In particular, it seems that Apache refuses to serve requests once it's no longer able to write to the log file.

  1. Is this configurable?
  2. What is the rationale behind this?

3 Answers 3

  1. Yes. Disable logging or get logrotate configured correctly to rotate and/or compress your log files.
  2. If log files are activated, the system has to assume that you want logging and it's a terribly bad idea for any server application to continue working when it can't log what it is doing. It's quite likely that the person who configured the logging needs it for one purpose or another.

Why is your disk full anyway?

  • 2
    Someone made the brilliant decision to build these servers with a single partition. The some other chucklehead decided to enable debug level logging on something and it filled up the root partition last night on all our web servers. Don't get me started on our after-hours support structure.
    – Mark
    Commented Jun 5, 2012 at 14:40

You seem to have multiple problems.

  1. It's possible that your server disk gets full. Don't you have any kind of trending and graphing (Cacti, snmp+mrtg, Munin) and monitoring (Nagios, Monit) in place? If you don't get notified about a disk getting more full than some % threshold, I bet you won't get alerts about other serious issues, either.
  2. You don't seem to have a sensible log rotation scheme or central logging configured.

Fix those. And if you have a busy server, configuring Apache to use syslog facilities instead of Apache's own log files can actually increase the performance, as Apache will not wait for the log entry to be actually written, it merely throws it at syslog trusting the message will get logged.

Google how you can use Apache's CustomLog directive together with logger and how you can set up a centralized log server. It will be good for you in the long run.

  • I use munin to monitor my servers. Besides monitoring it can alert on issues, which I have configured. It has several monitors available for apache in addition to system monitors.
    – BillThor
    Commented Jun 5, 2012 at 14:24

In addition to the good answers above, consider implementing Logrotate to control the size of the logs so you don't run out of disk space and can continue to server your site

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .