Re: Decaying Performance under newer apache/mp versions

[prev] [thread] [next] [Date index for 2005/05/09]

From: Ricardo Ramos Massaro
Subject: Re: Decaying Performance under newer apache/mp versions
Date: 20:08 on 09 May 2005
On 5/9/05, J.e. Turcotte <jet@xxxxxxx.xxx> wrote:
> Has anyone encountered similar problems?  Does anyone have a deeper
> understanding of the whole apache/mp/perl setup to just ~know~ what these
> symptoms are indicitive of?

I'm sorry if this is completely unrelated, I am somewhat of a mp newbie.

I've been recently bitten by some very similar problems on some
scripts (not mp handlers) where CGI parameters and cookies were
not being read correctly -- sometimes my script was seeing GET
and POST parameters completely unrelated to what the browser sent.
My scripts all looked like:

use strict;
use CGI;
my $cgi =3D new CGI();
sub process {
  my $x =3D $cgi->param('x');
  # ...
}
process();

Because the problem only appears when an apache process
is executing a script for the second time, it is very hard to track
(reducing the number of apache children to 1 is very helpful
for debugging). This problem and many possible solutions
are described in great detail in

http://perl.apache.org/docs/general/perl_reference/perl_reference.html#my__=
_Scoped_Variable_in_Nested_Subroutines

To understand why it is related to scripting in mp, see

http://perl.apache.org/docs/general/perl_reference/perl_reference.html#When=
_You_Cannot_Get_Rid_of_The_Inner_Subroutine

I changed "my $cgi =3D ..." to "local our $cgi =3D ..." and everything
started to work magically.

Ricardo

(message missing)

[mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 18:22 on 09 May 2005

Re: Decaying Performance under newer apache/mp versions
Ricardo Ramos Massaro 20:08 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 21:37 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 22:21 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 23:00 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 23:30 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 01:31 on 10 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 05:13 on 13 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 19:48 on 17 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 19:51 on 17 May 2005

Generated at 15:53 on 25 May 2005 by mariachi v0.52