Skylos wrote:
...
$Response->Cookies('ccc', 'key', 'val') ;
$Response->Cookies('ccc', 'Domain', 'mydomain.com');

resulted in

$Response->{Cookies}{ccc}{key} = 'val';
$Response->{Cookies}{ccc}{Domain} = 'mydomain.com';


This should work fine. The function AddCookieHeaders() should pick up this data correctly and do the right thing.

when it should have resulted in

$Response->{Cookies}{ccc}{Value}{key} = 'val';
$Response->{Cookies}{ccc}{Domain} = 'mydomain.com';


Using Value is one way it could be represented internally.

Did I miss a fix thats already been submitted?  Is a fix needed to be
submitted to correct this problem?  Am I using the method incorrectly?


What is the bug exactly, that this code did not work for you?

 $Response->{Cookies}{ccc}{key} = 'val';
 $Response->{Cookies}{ccc}{Domain} = 'mydomain.com';

Note, you should use either the hash method directly, or the API call,
but not both. You might be tripping up something odd if you are switching
your method of access.

I worked around it by populating the Response->{Cookies} hash manually for now.


That is a fine way to go.

Now the REAL perplexing problem.

As I mentioned we have two servers, which were running sticky.  The
clients arrive, get their cookies, return the cookies when signing up,
and everybody is happy because they get their commissions.  BUT, the
servers were not running balanced (and the more loaded one was running
into swap and slowing down response time) so we turned off session
sticky on port 80.


A web server should never run into swap. It implies a too high MaxClients setting, and/or not tuned well enough mod_perl.

Despite personal tests that worked fine - cookies set when they were
supposed to be, returned, page logic showed everything was working -
things weren't.  Joe Random User was somehow unable to get and/or
return the cookie values!  Signup rate plunged, and what signups we
did get were without documentation as to from whence they came.

We turned sticky back on, and immediately signup rates turned to
normal, and were documented.

I've been puzzling over this for about two days now - usually I come
up with something after awhile, realizing some method I used was not
correct in all circumstances or something - but this one really
boggles me.  Now that I've bounced it off of some other experts - What
do you think?  Any questions about the setup, methods, or any of that?
 Am I missing something that would be impacted by the user hopping
randomly between the servers?


2 things come to mind ...

 1) if there is $Session data that is relevant to the user, and that is
    being stored on the local file system, then switching to another system
    will not work, you'll need sticky sessions

 2) if the load balancers are actually redirecting to a web server with a
    new domain, then it may be that the browser is not sending the cookie
    to the new server despite your Domain flag set above, and you might
    this test.

Regards,

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to