httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <>
Subject Re: reliable piped logs
Date Mon, 07 Jul 1997 02:42:20 GMT
On Sun, 6 Jul 1997, Dean Gaudet wrote:

> So the reason I've hated to recommend using | to a logger before is
> that it's totally unreliable.  If for some reason the child should die,
> bad things happen.  Ideally the parent should be able to respawn the
> logging child and no hits should be lost.

Note that I also want to be able to do something similar for the listen
sockets.  On some OSes (particularly Linux and Solaris) we can get in
endless loops of accept() failures when something bad happens to the
socket, so it would be nice to detect that and close/reopen it.

> The children cannot do the spawning (there's the problem of
> synchronization, and permissions problems), and they need some way to get
> a new file handle for the new child.  Here's a few ways with the
> pros and cons I can think of:

> - un-named pipes and graceful restart
>     Proceed as we do now and if the logger dies then perform a
>     graceful restart.  Will lose the log of all the hits that children
>     are attempting to log when the graceful hits.
>     This could be helped by having an "overflow" file, much like how INN
>     handles its feeds.  When a child discovers that the logger is dead,
>     or that it would have to block while writing to the logger, then write
>     the data to another file handle into an overflow file.  The parent
>     opens both the logger pipe and the overflow file at init time.
>     There's a bit of work to properly get the logger to handle the overflow
>     file ... it's not easy (or desirable imho) to get db-like reliability
>     here, but it's possible to get a bit better than nothing.
> I'm partial to the last one.
> Thoughts?  Additions?

I guess I prefer the last one, but I'm not overly happy with any of them.
I'm not sure I trust using a child process in any case, no matter how
reliable it is.  That could just be my paranoia though.

I still think adding a bit to mod_log_config would be good.  

Oh yes, all the child process stuff should be abstracted out anyway.
Isn't there a seperate routine for each logging module that wants to use

View raw message