Re: double startup ?
Theo Schlossnagle <[email protected]> Wed, 05 May 2004 09:17:20 -0400
| Newsgroups | gmane.comp.apache.mod-backhand.general |
|---|---|
| Message-ID | <[email protected]> |
. TELAMON wrote: >Hello, > >I am, at present, testing mod_backhand for Load Balancing. > >I have written something like a "mod_perl servlet" and its behaviour has changed since I have installed mod_backhand : it seems like ih all the HTTP request were executed twice. > >I think that this problem is due to the fact that mod_backhand is started twice as shown in the logs/error_log of Apache : > > Likely not. ><IfModule mod_backhand.c> > UnixSocketDir /home/apache/backhand > MulticastStats 127.0.0.1:4445 > AcceptStats 127.0.0.0/24 > > Balancing on localhost? What is it that you hope to accomplish? I'll assume your just testing things. >Do you have any ideas ? > > Yes. mod_perl hooks directly into the Apache module hook API. Module hooks get called during every phase of the request _AND_ all sub requests. mod_backhand makes a benign subrequest to determine how Apache would have treated the request (transforms, etc) then makes a balancing decision. If you have any hooks other than "handler", they could get called more than once (this isn't only induced by mod_backhand, other modules do this too). If you are only using "handler", I think it is still possible, but I'd have to look into it more. $r->is_initial_req should give you some insight as to whether this is the "initial" Apache::Request for this HTTP request or not. -- // Theo Schlossnagle // Principal Engineer -- http://www.omniti.com/~jesus/ // Postal Engine -- http://www.postalengine.com/ // Ecelerity: fastest MTA on Earth