http://qs1969.pair.com?node_id=1200869

LorCo has asked for the wisdom of the Perl Monks concerning the following question:

CentOS 6.9, mod_perl 2.08, Apache 2.2, my script:
#!/usr/bin/perl print "Content-type: text/html; charset=UTF-8\n\n" ; ++$i ; print "i=$i, $ENV{MOD_PERL}, pid is $$<br>\n" ; exit ;

When I run it repeatedly(F5) using browser( http://www.xx...x.com/cgi-bin/test.cgi )

I got:

i=1, mod_perl/2.0.8, pid is 17578
i=2, mod_perl/2.0.8, pid is 17578
i=3, mod_perl/2.0.8, pid is 17578
i=1, mod_perl/2.0.8, pid is 467
i=2, mod_perl/2.0.8, pid is 467
i=4, mod_perl/2.0.8, pid is 17578
i=1, mod_perl/2.0.8, pid is 24789
i=2, mod_perl/2.0.8, pid is 24789
i=3, mod_perl/2.0.8, pid is 24789
i=5, mod_perl/2.0.8, pid is 17578
i=3, mod_perl/2.0.8, pid is 467
i=1, mod_perl/2.0.8, pid is 24378
i=2, mod_perl/2.0.8, pid is 24378
i=1, mod_perl/2.0.8, pid is 2742
i=2, mod_perl/2.0.8, pid is 2742

The script re-compiled every time for new pid ( i=1 ) .

Is it something wrong with server/mod_perl or with my knowledge in mod_perl?
Is it Apache recompile a script for every new child/process?

Please help understand this.

Thank you, Alex