httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: Second beta release?
Date Thu, 17 Aug 1995 21:14:40 GMT
   Date: Thu, 17 Aug 95 13:36:17 BST
   From: Andrew Wilson <>
   Precedence: bulk

   > 1) in my opinion file locking on log files is just plain bad.  I found 
   > this out tonight while setting up some tricky internal web stuff - I want 
   > to have two wholly separate daemons on two separate ports logging to the 
   > same error and access log file, so I don't want to have one trying to 
   > block the other by locking the log files.  

   Agreed, I've tried doing this lots of times, bringing a new copy of apache
   up on 8888 alongside it's older sibling on 80.  I don't want the servers to
   interfere with each other, and I don't really care if they write to the same
   log files for a short while.

	   http -nolocks


Ummm... the locks we're talking about are *not* meant to keep multiple
processes from writing to the logs simultaneously.  So why lock them
at all?

Well, some systems do require mutual exculsion around the accept() in
standalone_main(); prior to 0.8.10 (hope, hope), that was done by
putting an advisory write lock on the error log, on the theory that
that was a file which all of the server processes would have open.
This was never intended to keep multiple servers from writing to the
log file itself at the same time (yet another good reason to put the
lock on something else; with drtr's code it's an empty file which
exists for the sole purpose of getting locked).


View raw message