You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Dietmar Thal <d...@dequid.net> on 2006/08/20 04:44:47 UTC

mod_perl2 installed, but scripts slow

Hey,

I have recently upgraded from mod perl 1.999 to 2.0.2
on Apache 2.0.54 (Debian).
I recognized that my scripts are being executed very
slow, especially the first request (after server restart)
needs about 4 seconds until a response begins.

I'm using Petal-templating and stuff, which was very slow
on my local machine (Win XP) until i gave mod_perl a try.
But now on our live-server (Debian) it seems as if the
scripts are not being accelerated through mod_perl.

I tried to find out if mod_perl is properly installed,
$ENV{'MOD_PERL'} says 'mod_perl/2.0.2'.
Is there a reliable method to find out if the scripts
are being 'processed' through mod_perl?

My setup:

<Files ~ "\.(html|pl|pm)$">
   SetHandler perl-script
   PerlHandler ModPerl::Registry
   PerlSendHeader On
</Files>

For installation, i followed instructions on
http://apache.perl.org/docs/2.0/user/install/install.html#Dynamic_mod_perl

Some more hints:
After installing, when i tried to restart Apache,
error.log said, it cant find Apache2.pm in @INC,
so i removed the line 'PerlModule Apache2' from my conf.
Or is it needed?

And when i restart Apache, i have this notice in error.log:

[Sun Aug 20 04:30:57 2006] [notice] FastCGI: process manager initialized 
(pid 11303)

For my understanding: FastCGI == mod_perl?
And if not, what is FastCGI for?

You'll propably notice, that i am quite a mod_perl newbie,
so thanks for your patience :)

So long,
Paul

Re: mod_perl2 installed, but scripts slow

Posted by Jonathan <jv...@2xlp.com>.
i'm not going to speak of the mod_perl install setup, but I will say  
this:

it sounds like a lot of the  speed issues have to  do with compile  
issues.

mod perl speeds up serving content by caching the perl modules.    
most people use a startup.pl file that is included from httpd.con in  
a PerlRequire option.  The startup script will preload all of the  
Perl modules into mod_perl (ie: Petal / MkDoc / etc ).  On top of  
that, people will also run a perl routine to compile the Petal  
templates.  That pushes the  time required to  compile the modules  
from the first request into the startup phase of apache.