cronolog.org
flexible web log rotation
HOME
DOWNLOAD
FEATURES
USAGE
FAQ
BLOG
KNOWN BUGS
SECURITY
PATCHES
USERS
TO DO
HISTORY
LINKS
FEEDBACK
MAILING LIST
ADVERTISING

support cronolog development



Google   HELP


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CRONOLOG: VS: Cronolog processes



Apache 1.3 provides the piped log facility which creates a process to
filter a log stream -- if you have 500 webs each with its own piped
log then you will have 500 extra processes, or perhaps 1000! as Apache
spawns /bin/sh to process the command line, and the shell process
sticks around too.  Within the confines of piped-logs there is nothing
much that can be done about the processes.
There are a couple of ways to redesign cronolog as a module to cope
better in this sort of situation:
1. the module could just open the required file (in append mode),
   write the log message and close the file 
2. the module could maintain a cache (in each process) of the most
   recently accessed log files, closing the least recently used file
   descriptor (and/or any descriptors that are no longer valid
   according to their templates)
3. have a server process to handle all the logging requests
I started along the third route a couple of months ago, but other
demands on my time intervened.  I might have a look at the second
approach, as it might be simpler and would avoid the complexities of
interprocess communication, etc.
Things are starting to ease off here (we have been launching a new
publishing imprint for cookery books -- see www.pauntley-press.co.uk),
and I may well have a chance to revisit the cronolog code in the next
couple of weeks.
Andrew
--
Andrew Ford,  Director       Ford & Mason Ltd             Tel: +44 1531 829900
A.Ford@xxxxxxxxxxxxxxxx      South Wing, Compton House    Fax: +44 1531 829901
http://ford-mason.co.uk      Compton Green, Redmarley  Mobile: +44 7785 258278
http://pauntley-press.co.uk  Gloucester, GL19 3JB
http://refcards.com          Great Britain
Ronnie Bach Nielsen writes:
 > Hi,
 > 
 > I'm using the cronolog script to rotate logfiles on my Apache server and
 > well satisfied with it.
 > But it creates a new process for every virtual web I create...
 > Is this good?
 > 
 > I mean what if I have 500 webs running on the same machine, then cronolog
 > will have 500 processes running???
 > 
 > Why does the cronolog process keeps running?
 > I would expect it to start a process when a request hits the apache, then
 > write to the log and then quit the process. Or is this too slow???
 > 
 > Thanks in advance.
 > 
 > --
 > Ronnie

Copyright © 1996-2010 Andrew Ford and Ford & Mason Ltd