httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: Log file and databases
Date Tue, 09 May 1995 09:01:22 GMT
   Date: Mon, 08 May 1995 14:53:19 -0500
   From: Randy Terbush <randy@dsndata.com>

   Naive question warning:
   Would it not be possible for the children to open a socket back to the
   parent for logging transactions?

You don't even need that much --- they could use pipes (as in the NCSA
1.4 code, in which children use pipes back to the parent process to
let it know when they're ready for another transaction).  But it may
well be just as easy for the parent process to fork off yet *another*
child at startup time solely to handle the logging, and to lay in the
pipe-work for that.  (*Most* of the code probably wouldn't have to
know about either of these arrangements --- the existing xfer_log and
error_log handles could just be arranged to point at the pipes).

The danger, either way, is that if the logging process doesn't get
scheduled often enough, these pipes could back up, resulting in
unnecessary delays before a child process is back in service.  We
already know this is a problem at the head end (accepting connections)
--- it *might* be a problem at the back end as well.

Having a separate logging process also raises at least one other
fairly knotty issue --- how to handle cases where the logging process
dies an untimely death, perhaps through no fault of its own.  (There
are some Unices which simply zing a process at random when resource
contention gets severe).

   IF this could be done, this would possibly solve some of the current
   security issues. It would be relativly easy to write the logging
   modules for different database formats.

It's certainly true that you can't seek a pipe.  Using a named pipe as
the logfile, as you suggest below, might be a good way to prototype
something like this --- you don't have to hack the server code at all.
Alternatively, I can imagine config file entries like

   TransferLog "| /etc/xfer_log_maint -mode count -db /var/logs/xfer.dbm"

Of course, this begs the question of exactly *what* gets sent to this
process over the pipe.  CLF entries are a start for the xfer_log, but
they aren't completely satisfactory to anybody, and the error_log is
at this point completely unstructured.

   This is a Perl5 dynamic module. There has been some reference
   to it on Roy's cgi-lib mailing list.  I understand that the current
   source can be found at http://web.nexor.co.uk/contrib/perl/.
   Nexor is unreachable so I cannot verify that.

Thanks, I'll look it up.

rst


Mime
View raw message