Re: Re: double startup ?

". TELAMON" <[email protected]> Wed, 5 May 2004 16:19:58 +0200 (CEST)
Newsgroups gmane.comp.apache.mod-backhand.general
Message-ID <25445214.1083766798461.JavaMail.www@wwinf0902>
Thank your for your fast answer

1) Yes, I'm balancing on my localhost just for tests

2) I'm just using "handler" in my hook module. Indeed, $r->is_initial_req g=
ave me some informations : the initial HTTP requests are not any more "init=
ial" whith mod_backhand. In fact, I use this information in order to set Se=
ssion Id when the client asks the Web Application for the first time. So I =
try to rewrite my hook module but the double call is still here : a first s=
ession id is created but not used, then a second session id is created and =
used (unused means here that $r->header_out(Location =3D> + return HTTP_MOV=
ED_TEMPORARILY() is not effective)


It is likely because my "mod_perl servlet" is not compatible with mod_backh=
and (maybe because of the strange way I manage session : I rewrite the init=
ial URL http://www.foo.com/my_page in http://www.foo.com/id_session/my_page=
 and I'm using Apache::Session::File or Apache::Session::Oracle). It's a pi=
ty because mod_backhand is exactly what I need.

Any help, of course, is much appreciated


Aymeric Masson



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