Re: problem with error_log_spread.pl

Yair Amir <[email protected]> Fri, 15 Nov 2002 13:26:34 -0500
Newsgroups gmane.comp.apache.mod-log-spread.user
Organization Johns Hopkins University
Message-ID <[email protected]>
Hi,

I am not sure what exactly error_log_spread.pl is doing.

I am speculating that the reason for the "could not connect" is
that the number of processes that tried to connect at the same time is
more than what listen() will allow (in Spread this is set to 5).
So, probably a small delay between initializing each of the processes
will help. I am not sure this is practical advice - your will
definitely work (re-try). Also - the OS has a limit on what this
listen() parameter is. Let me know what it is - we can change it for
the next version in Spread.

    Cheers,

    :) Yair.
    
Jay> Some time ago I raised this issue, but it hasn't been resolved yet:

Jay> I have a number of websites which are configured with the following line....

Jay> CustomLog "|/usr/local/sbin/error_log_spread.pl -g test"

Jay> When you do an "apachectl start" to start the webserver, apache starts a
Jay> separate process for each of the error_log_spread.pl invocations. If they
Jay> all go fine, each error_log_spread.pl line generates a linefeed. So if I
Jay> have 10 sites using the above line (but with a different spreadlog group for
Jay> each), an "apachectl start" generates 10 line feeds then returns to a
Jay> command prompt and everything is perfect.

Jay> However, about 50% of the time, when I do "apachectl start", I will get some
Jay> number of messages from error_log_spread.pl that say "Could not connect",
Jay> and the balance of linefeeds. For example, one time I do the apachectl start
Jay> I may get 3 "could not connect" messages and 7 linefeeds (total 10 results).
Jay> It is not always the same customlog statements generating the could not
Jay> connect message. If I stop and start apache, I may get 2 could not connects
Jay> and 8 linefeeds. If I do it several times, finally I will just get the 10
Jay> linefeeds. The long and short of it is... out of 10 custom log directives
Jay> calling error_log_spread.pl, SOME number of them fail to connect UPON
Jay> STARTUP ONLY.

Jay> What this tells me is that there is some sporadic timing condition where the
Jay> error_log_spread.pl script can't make the initial connection to spread. The
Jay> net effect of this is some of the websites don't get logging when this
Jay> happens. This is especially problematic for us, as the websites are updated
Jay> remotely by the programmers, and the script does this...

Jay> apachectl stop
Jay> wackatrl -f
Jay> (cvs/rsync stuff)
Jay> wackatrl -s
Jay> apachectl start

Jay> So, when they trigger the script, about 50% of the time, not all the loggers
Jay> start, a very bad thing.

Jay> I would suggest the way to do this is modify the error_log_spread.pl script
Jay> so that if it fails to connect, it tries like 3 times before giving up or
Jay> something along those lines. However, I'm not a perl programmer so I have no
Jay> idea how to do this. George sent me a modification but it didn't run :( Any
Jay> thoughts?

Jay> Thanks!!!

Jay> Jay West

Jay> ---
Jay> [This E-mail scanned for viruses by Declude Virus]


Jay> _______________________________________________
Jay> mls-users mailing list
Jay> [email protected]
Jay> http://lists.backhand.org/mailman/listinfo/mls-users