Apache::Registry executing scripts multiple times
Apache::Registry executing scripts multiple times
am 04.11.2009 23:58:38 von Dave Morgan
Hi All,
Please forgive me if the answer is in the docs, I looked without success.
I have a very simple index_test.pl script which appears to get called by Apache::Registry
multiple times. I have tested in single server mode (httpd -X) and still get the same
results. The output is correct but the error_log shows multiple calls from the
Apache::Registry module. While this simple program appears to get called 5 times
our big one was only getting called twice, however, that did have a very noticeable
effect on response time.
We have also removed the Apache::Reload module without effect.
Any ideas, pointers or help appreciated
Dave
############################################################ ###
Environment:
Apache 1.3.37
mod-perl 1.30
perl 5.8.8
############################################################ ####
Relevent httpd.conf section:
ScriptAlias /metapoint/ "/home/tomcat/metapoint/trunk/"
AllowOverride None
SetHandler perl-script
PerlInitHandler Apache::Reload
PerlHandler Apache::Registry
Options ExecCGI
Order allow,deny
Allow from all
############################################################ ####
index_test.pl:
our $i;
print "pre hello $i
";
$i++;
my ($package, $filename, $line) = caller();
print STDERR "$package, $filename, $line, $i\n\n";
print "hello $i";
############################################################ ######
output:
pre hello 84
hello 85
############################################################ #######
error_log output:
Apache::Registry, /opt/lib/perl5/site_perl/5.8.8/i686-linux/Apache/Registry.pm , 149, 1
Apache::Registry, /opt/lib/perl5/site_perl/5.8.8/i686-linux/Apache/Registry.pm , 149, 1
Apache::Registry, /opt/lib/perl5/site_perl/5.8.8/i686-linux/Apache/Registry.pm , 149, 2
Apache::Registry, /opt/lib/perl5/site_perl/5.8.8/i686-linux/Apache/Registry.pm , 149, 2
Apache::Registry, /opt/lib/perl5/site_perl/5.8.8/i686-linux/Apache/Registry.pm , 149, 3
############################################################ ##########
--
Dave Morgan
1001111 Alberta Limited
dave.morgan@1001111.com
403 399 2442
Re: Apache::Registry executing scripts multiple times
am 05.11.2009 22:39:04 von Perrin Harkins
On Wed, Nov 4, 2009 at 5:58 PM, Dave Morgan wrote:
> I have a very simple index_test.pl script which appears to get called by Apache::Registry
> multiple times.
I don't see anything in what you've shown us here that would explain
this behavior. I think the problem is in the rest of your httpd.conf,
or your proxy/load-balancer, or your test client.
- Perrin
Re: Apache::Registry executing scripts multiple times
am 05.11.2009 22:44:27 von gozer
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig945C2C4487C8C9E2F55039F4
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 09-11-04 17:58 , Dave Morgan wrote:
> Hi All,
> Please forgive me if the answer is in the docs, I looked without succe=
ss.
> I have a very simple index_test.pl script which appears to get called b=
y Apache::Registry
> multiple times. I have tested in single server mode (httpd -X) and stil=
l get the same
> results. The output is correct but the error_log shows multiple calls f=
rom the
> Apache::Registry module. While this simple program appears to get calle=
d 5 times
> our big one was only getting called twice, however, that did have a ver=
y noticeable
> effect on response time.
>=20
> We have also removed the Apache::Reload module without effect.
>=20
> Any ideas, pointers or help appreciated
>=20
> Dave
> ############################################################ ###
> Environment:
> Apache 1.3.37
> mod-perl 1.30
> perl 5.8.8
> ############################################################ ####
> Relevent httpd.conf section:
>=20
> ScriptAlias /metapoint/ "/home/tomcat/metapoint/trunk/"
>
> AllowOverride None
> SetHandler perl-script
> PerlInitHandler Apache::Reload
> PerlHandler Apache::Registry
> Options ExecCGI
> Order allow,deny
> Allow from all
>
>=20
> ############################################################ ####
> index_test.pl:
>=20
> our $i;
our ? shouldn't that be my ? our makes that variable a package global,
so it will stick around between requests, just like $some::package::name
would.
--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
--------------enig945C2C4487C8C9E2F55039F4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFK80c8yzKhB4jDpaURAgJEAKCQ+bs7STYLnXla9155q2W6Mu7l2gCg uphX
4kIIOmxtvxbbzzqZJsY0tys=
=viNG
-----END PGP SIGNATURE-----
--------------enig945C2C4487C8C9E2F55039F4--
Re: Apache::Registry executing scripts multiple times
am 06.11.2009 05:22:45 von Adi Yatama Adi Guna
HTTP header missing? text/plain
Philippe M. Chiasson wrote:
> On 09-11-04 17:58 , Dave Morgan wrote:
>
>> Hi All,
>> Please forgive me if the answer is in the docs, I looked without success.
>> I have a very simple index_test.pl script which appears to get called by Apache::Registry
>> multiple times. I have tested in single server mode (httpd -X) and still get the same
>> results. The output is correct but the error_log shows multiple calls from the
>> Apache::Registry module. While this simple program appears to get called 5 times
>> our big one was only getting called twice, however, that did have a very noticeable
>> effect on response time.
>>
>> We have also removed the Apache::Reload module without effect.
>>
>> Any ideas, pointers or help appreciated
>>
>> Dave
>> ############################################################ ###
>> Environment:
>> Apache 1.3.37
>> mod-perl 1.30
>> perl 5.8.8
>> ############################################################ ####
>> Relevent httpd.conf section:
>>
>> ScriptAlias /metapoint/ "/home/tomcat/metapoint/trunk/"
>>
>> AllowOverride None
>> SetHandler perl-script
>> PerlInitHandler Apache::Reload
>> PerlHandler Apache::Registry
>> Options ExecCGI
>> Order allow,deny
>> Allow from all
>>
>>
>> ############################################################ ####
>> index_test.pl:
>>
>> our $i;
>>
>
> our ? shouldn't that be my ? our makes that variable a package global,
> so it will stick around between requests, just like $some::package::name
> would.
>
>
Re: Apache::Registry executing scripts multiple times
am 09.11.2009 18:02:44 von Dave Morgan
Thanks to all who responded.
It is a development setup so no proxy or load balancer in the mix
I could have sworn I had tested the behaviour in other clients, we use Opera,
so I took the Apache configuration back to bare bones and still had the issue.
Testing with Firefox showed the expected (single call) behaviour.
Fsck, I hate browsers.
Anyway, now to test a simple CGI call and see if the Opera strangeness continues
Thank once again for your help
Dave
Perrin Harkins wrote:
> On Wed, Nov 4, 2009 at 5:58 PM, Dave Morgan wrote:
>> I have a very simple index_test.pl script which appears to get called by Apache::Registry
>> multiple times.
>
> I don't see anything in what you've shown us here that would explain
> this behavior. I think the problem is in the rest of your httpd.conf,
> or your proxy/load-balancer, or your test client.
>
> - Perrin
--
Dave Morgan
Senior Consultant, 1001111 Alberta Limited
dave.morgan@1001111.com
403 399 2442