httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: reliable piped logs
Date Mon, 07 Jul 1997 03:11:07 GMT
On Sun, 6 Jul 1997, Dean Gaudet wrote:

> On Sun, 6 Jul 1997, Marc Slemko wrote:
> 
> > 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 endless loop of select() thing seems to have disappeared with 1.2
> though, hasn't it?  I remember seeing reports against early betas but Roy
> rewrote child_main and it seemed to cure it.

Erm... accept(), not select().

No, I think I still have reports under 1.2.  Just remembered, Unixware was
the other OS I saw a lot of reports about it on.  The basic problem with
the current code is that if the socket gets messed up in any way, Apache
will never figure it out and reopen it.  Unfortunately, this isn't easy to
fix which is why it isn't. 

We can see how it goes with 1.2... 

> 
> > > 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.
> 
> Here's another one... have the parent open a pipe() to the logger, and
> a separate pipe() that multiplexes the children.  The parent shuffles
> bytes from the child pipe into the logger pipe.  It's ok to puke now,
> I'm just being thorough.

You know, that one isn't actually so bad if you ignore the fact that you
are adding another copy.  Unfortunately, that fact is a bit hard to
ignore.

> Oh yeah, on the unix-domain one, I might be wrong -- the children may
> not ever need to "reopen" it if you can connect() and then pass the
> connected socket to the children.  A connected dgram socket means
> you don't have to specify the receiver when you're writing to it.
> This may run into portability problems -- hopefully it's implemented
> with an access check at connect() time rather than at write() time.
> This could make the unix-domain one a better choice, depending on how
> you feel about the possibility of losing a few datagrams in high
> loads.

Hmm.  Interesting idea.  Still don't buy the reliability though.  OTOH, I
don't buy into syslog either but I (and nearly everyone else in the world) 
use it all the time. 


Mime
View raw message