ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-mod_perl
perl-mod_perl
Apache::Registry executing scripts multiple times
by Dave Morgan other posts by this author
Nov 4 2009 3:18PM messages near this date
Re: Using multiple perl interpreters | Re: Apache::Registry executing scripts multiple times
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/"
<Directory "/home/tomcat/metapoint/trunk"> 
                AllowOverride None
                SetHandler perl-script
		PerlInitHandler Apache::Reload
                PerlHandler Apache::Registry
                Options ExecCGI
                Order allow,deny
                Allow from all
</Directory> 

################################################################
index_test.pl:

our $i;
print "pre hello $i <br /> ";
$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@[...].com
403 399 2442
Thread:
Dave Morgan
Philippe M. Chiasson
Adi Yatama Adi Guna
Perrin Harkins
Dave Morgan

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved