perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Foo JH <jhfoo...@extracktor.com>
Subject Re: PerlRequire executed 4 times on apache startup
Date Tue, 28 Aug 2007 07:34:40 GMT
I've had this same experience on Win32 Apache 2 as well. It could be 
related to the MPM model that the Win32 implementation employs.

Tobias Zeising wrote:
> Hi all,
>
> I have a weird problem: on startup apache executes 4 times a Perl Script
> I included via
>
>  PerlPostConfigRequire startup.pl
>
> in the httpd.conf. The startup script contains following code:
>
>  #!/usr/bin/perl
>
>  my $file = 'c:\tmp\test.txt';
>  open(INFO ,">>$file") || die "Error $!";
>  print INFO "test\n";
>  close INFO;
>  print STDERR "test...\n";
>  1;
>
> After starting the apache server (with an empty test.txt) the error.log
> contains as expectet one time "test..." and the test.txt contains
> curiously four times "test". That means apache has executed the
> startup.pl four times.
>
> I have found http://modperlbook.org/html/ch04_07.html but that "apache
> config test" would only explain the execution of two times.
>
> Actually the startup.pl contains some code for preloading a huge amount
> of modules, so this needs about 10 seconds instead of 2 or 3.
>
> Hope anybody knows or can explain this behaviour.
>
> Thanks and best regards
>  Tobi
>   


Mime
View raw message