You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by George Cox <gj...@gjvc.com> on 2007/02/10 10:58:13 UTC

Re: Piped logger nightmares

* William A. Rowe, Jr. <wr...@rowe-clan.net> [20070105 23:37] wrote:
> http://svn.apache.org/viewvc?view=rev&sortby=date&revision=104019
> 
> is a complete disaster to Win32 as-a-service.  It works fine from the
> command line, but the lack of stdout/stderr channels causes cmd.exe "in a
> service" appear to cause the CreateProcess of cmd.exe to implode.
> 
> As I look at it, the choice to add another indirection between httpd and
> the pipe process adds some horrible resource issues to the server,
> especially with many, many separate rotated log files.  Also, this extra

I'm going to wade in here, and hopefully add something of value.  If I
don't, please flame as hard as you can etc.  I've written a module which
automatically rotates access logs.  It's called mod_log_access, and the
latest version is available at:

  http://www.gjvc.com/software/apache/modules/

It only does access logs, not error logs, for reasons  people on this list
will well understand, but if you have any preferences on how it should be
done, please let me know.  I would really like to see this (or something
like it) added to httpd-trunk/ and would be happy to maintain it.

Please reply off-list -- I don't mean to hijack the discussion.

best;


gjvc

Re: mod_log_access [was: Piped logger nightmares]

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
George Cox wrote:
> 
> I'm going to wade in here, and hopefully add something of value.  If I
> don't, please flame as hard as you can etc.  I've written a module which
> automatically rotates access logs.  It's called mod_log_access, and the
> latest version is available at:
> 
>   http://www.gjvc.com/software/apache/modules/
> 
> It only does access logs, not error logs, for reasons  people on this list
> will well understand, but if you have any preferences on how it should be
> done, please let me know.  I would really like to see this (or something
> like it) added to httpd-trunk/ and would be happy to maintain it.
> 
> Please reply off-list -- I don't mean to hijack the discussion.

No hijaak - it's worth answering your plea on-list for others to have the
answers too.  The suggestion has come up many times ;-)

The reason for the no-rotate policy was always a combination of issues,
firstly security (need for root to open incremental log files after it's
no longer running as root, or getting replacement pipes to the children
if the parent still root was to open those logs.)  This was better handled
by a detached root process, so rotatelogs was born.

The other half of the equation was the general overhead and number of fd's
required.  The authors since way-back-when decided it's best not to pollute
the running apache httpd process with heavy lifting duties for the log files.

As an add-in module, I don't necessarily agree with any of the later half
of these objections.  A module which solved the first issue, optionally
loaded, would interest me for a future 2.4 or 3.0 release.

Bill