httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <v.j.orlikow...@gte.net>
Subject Piped logs and 1.3.x
Date Mon, 30 Oct 2000 15:54:24 GMT
Hello all,

   Looking for a suggestion on the best possible way to handle a
bad situation:
   A fellow has issued a problem report with piped logs and running
out of disk space. The problem involves a ramp-up in traffic, and not
enough space to contain the piped logs. The relevant lines in the
fellow's httpd.conf are:

ErrorLog "|rotatelogs (his log dir)/error_log/86400"
CustomLog "|rotatelogs (his log dir)/access_log 86400"

   Now, around the time he runs out of space, Apache stops serving
requests, and the last few messages in the errorlog are:
(his log dir)/accesslog.date: No space left on device

   Checking through the 1.3.x source, rotatelogs exits if it 
cannot open(2) or write(2) to the desired log file. So, it would
appear that Apache attempts to write to the pipe to log a request, 
finds that the program died, tries to spawn it off again, and fails
due to the lack of space. Then we attempt the logging/spawning cycle
again, ad nauseum.

   Not pretty.

   So my question comes: what should be the preferred behavior? Check
out why the logger proggie died for certain well known conditions
(i.e. not enough space left on the device), try (possibly failingly)
to log it, and die? Or sit and spin? Or maybe another solution is in order...

   I'll work out a patch based on your decision. I'm not too pleased
with either behavior that I've suggested, but this *should never
happen* (with proper planning).

Victor
-- 
Victor J. Orlikowski
======================
v.j.orlikowski@gte.net
vjo@raleigh.ibm.com
vjo@us.ibm.com


Mime
View raw message