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 <li...@dequid.net> on 2006/08/20 04:48:06 UTC

mod_perl2 installed, but scripts still 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 still slow

Posted by Fred Moyer <fr...@taperfriendlymusic.org>.
Dietmar Thal wrote:
> Hey,
> 
> I have recently upgraded from mod perl 1.999 to 2.0.2
> on Apache 2.0.54 (Debian).
> 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?

Take a look at http://perl.apache.org/docs/2.0/rename.html#Effects
and adjust your setup accordingly.  From your post it sounds like you
had the pre-naming change 1.999 version.

> 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?

If you show us some of your template processing code, and a sample
request, I could give you a more educated answer.  Although I haven't
used Petal, several people on this list have.

> 
> 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

Looks ok to me but I haven't used the registry approach for what it's worth.

 > 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?

FastCGI ne mod_perl
http://www.fastcgi.com/

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

No problem, hope some of that helps.  We could give more help if you
show us what you're trying to do with your code though :)

> 
> So long,
> Paul


Re: mod_perl2 installed, but scripts still slow

Posted by Fred Moyer <fr...@taperfriendlymusic.org>.
Dietmar Thal wrote:
> Hey,
> 
> I have recently upgraded from mod perl 1.999 to 2.0.2
> on Apache 2.0.54 (Debian).
> 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?

Take a look at http://perl.apache.org/docs/2.0/rename.html#Effects
and adjust your setup accordingly.  From your post it sounds like you
had the pre-naming change 1.999 version.

> 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?

If you show us some of your template processing code, and a sample
request, I could give you a more educated answer.  Although I haven't
used Petal, several people on this list have.

> 
> 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

Looks ok to me but I haven't used the registry approach for what it's worth.

 > 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?

FastCGI ne mod_perl
http://www.fastcgi.com/

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

No problem, hope some of that helps.  We could give more help if you
show us what you're trying to do with your code though :)

> 
> So long,
> Paul