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

Yes, as Foo observed, this will happen 2x on Unix, 4x on Windows due to the MPM.

Notice that 1x and 2x (and 5x and 8x and 11x upon restarts) are all occurring
in the parent.  They aren't in the worker process at all, they were only pre-
tested to ensure your script compiles and runs.

The 3x and 4x times are in the child process that serves your request.  First
to pretest the config (yes, again!) and then the copy that will persist until
the worker process terminates.

Upon a graceful restart, that copy dies, the config is reprocessed in the parent
1x only again, and then 2x in the child.

We could (obviously) dump the extra success-test in the child.  But doing so
would break a huge assumption by coders like yourselves that rely on the pre
test followed by the actual run.

On Unix, you will see it run 1x for config test, followed by the 2x for the
worker children.  On a graceful restart, you'll see it happen a 3x time, etc.

Bill

Reply via email to