Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

15s latency with fastcgi+Apache2+catalyst 5.8

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


paulm at paulm

May 19, 2009, 9:49 AM

Post #1 of 6 (883 views)
Permalink
15s latency with fastcgi+Apache2+catalyst 5.8

I'm in the process of upgrading our app to Catalyst 5.8 and Apache 2
on a stock Debian box. The webpages are taking pretty much exactly 15s
to load. I tried stripping out images and other media and even with it
down to the HTML & favicon.ico it's 15s - i.e. it's not blocking on a
particular item.

I have Apache and libapache2-mod-fastcgi and the server running in
standalone. It's been working fine in the old Apache 1.3 + Catalyst
5.7012 environment for years.

I've read various suggestions about DNS but presumably it isnt this
since it's using a fastcgi socket. Other sites served by Apache on
this machine aren't having latency issues.

Profiling ain't working,

paulm [at] rpi:~/idl/trunk$ . etc/env/dev.sh; PERL5OPT=-d:DProf
IDL-Web/script/idl_web_fastcgi.pl -l /tmp/idl_web_dev.socket -n 1 -p
/tmp/idl_web_dev.pid
panic: Devel::DProf inconsistent subroutine return at
/usr/share/perl5/Catalyst.pm line 1039.

NYTProf fails too,
$ nytprofhtml Generating report...
Reading nytprof.out
inflate failed, error -5 ((null)) at end of input file - is it
truncated? at /usr/lib/perl5/Devel/NYTProf/Data.pm line 78.

Any other hints?

Thanks,
Paul

PS not sure if this is related,
IDL::Web is using the deprecated Catalyst::Base, update your
application as this will be removed in the next major release at
/usr/share/perl5/Catalyst/Base.pm line 7.

Catalyst::Base doesn't appear in our app anywhere(?!)

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

May 19, 2009, 10:09 AM

Post #2 of 6 (824 views)
Permalink
Re: 15s latency with fastcgi+Apache2+catalyst 5.8 [In reply to]

Paul Makepeace wrote:
> I have Apache and libapache2-mod-fastcgi and the server running in
> standalone. It's been working fine in the old Apache 1.3 + Catalyst
> 5.7012 environment for years.

Why are you changing _everything_ at once?

Why not upgrade from apache 1 => apache 2, and then upgrade Catalyst (or
vice versa), as currently you've got no idea which of those upgrades is
causing the issue.

> NYTProf fails too,
> $ nytprofhtml Generating report...
> Reading nytprof.out
> inflate failed, error -5 ((null)) at end of input file - is it
> truncated? at /usr/lib/perl5/Devel/NYTProf/Data.pm line 78.

You're not exiting cleanly.

add:

sub exit : Local {
exit 0;
}

to your app, then hit that as the last hit.

You should now have profile data you can use..

> PS not sure if this is related,
> IDL::Web is using the deprecated Catalyst::Base, update your
> application as this will be removed in the next major release at
> /usr/share/perl5/Catalyst/Base.pm line 7.
>
> Catalyst::Base doesn't appear in our app anywhere(?!)

Hmm, well, I think that it does..

The warning is issues whenever a class which @ISA Catalyst::Base is
constructed.

Use Devel::SimpleTrace, and it should give you more hints..

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


adeltoso at adamans

May 20, 2009, 5:13 AM

Post #3 of 6 (818 views)
Permalink
Re: 15s latency with fastcgi+Apache2+catalyst 5.8 [In reply to]

On Tue, 19 May 2009 17:49:32 +0100
Paul Makepeace <paulm [at] paulm> wrote:

> I'm in the process of upgrading our app to Catalyst 5.8 and Apache 2
> on a stock Debian box. The webpages are taking pretty much exactly 15s
> to load. I tried stripping out images and other media and even with it
> down to the HTML & favicon.ico it's 15s - i.e. it's not blocking on a
> particular item.
>
> Any other hints?

My 2 cents: have you tried to disable mod_deflate (if running)?
Have a nice day,
Arjuna

> Thanks,
> Paul
>
> PS not sure if this is related,
> IDL::Web is using the deprecated Catalyst::Base, update your
> application as this will be removed in the next major release at
> /usr/share/perl5/Catalyst/Base.pm line 7.
>
> Catalyst::Base doesn't appear in our app anywhere(?!)
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/ Dev site:
> http://dev.catalyst.perl.org/

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

May 20, 2009, 5:32 AM

Post #4 of 6 (813 views)
Permalink
Re: 15s latency with fastcgi+Apache2+catalyst 5.8 [In reply to]

Arjuna Del Toso wrote:
> On Tue, 19 May 2009 17:49:32 +0100
> Paul Makepeace <paulm [at] paulm> wrote:
>> Any other hints?
>
> My 2 cents: have you tried to disable mod_deflate (if running)?

Oh yes, good call - that's a known gotcha.

Can someone work up a doc note to stick in ::Engine::FastCGI about that?

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


paulm at paulm

May 20, 2009, 3:13 PM

Post #5 of 6 (810 views)
Permalink
Re: 15s latency with fastcgi+Apache2+catalyst 5.8 [In reply to]

On Wed, May 20, 2009 at 1:13 PM, Arjuna Del Toso <adeltoso [at] adamans> wrote:
> On Tue, 19 May 2009 17:49:32 +0100
> Paul Makepeace <paulm [at] paulm> wrote:
>
>> I'm in the process of upgrading our app to Catalyst 5.8 and Apache 2
>> on a stock Debian box. The webpages are taking pretty much exactly 15s
>> to load. I tried stripping out images and other media and even with it
>> down to the HTML & favicon.ico it's 15s - i.e. it's not blocking on a
>> particular item.
>>
>> Any other hints?
>
> My 2 cents: have you tried to disable mod_deflate (if running)?

Yes, this is it. Thanks.
(http://www.debian-administration.org/users/simonw/weblog/294 has
details for anyone new to this.)

So obviously I don't want to sacrifice compression especially with our
XML serving. Seems like fastcgi is hosed with this and fcgid couples
the server to Apache too much (for me). I read Aristotle recommending
::Engine::HTTP::Prefork + mod_proxy. What are the ways forward here?
If I can keep fastcgi that'd be nice for reducing my upgrade workload.

Paul

PS GAAHHH!!

> Have a nice day,
> Arjuna
>
>> Thanks,
>> Paul
>>
>> PS not sure if this is related,
>> IDL::Web is using the deprecated Catalyst::Base, update your
>> application as this will be removed in the next major release at
>> /usr/share/perl5/Catalyst/Base.pm line 7.
>>
>> Catalyst::Base doesn't appear in our app anywhere(?!)
>>
>> _______________________________________________
>> List: Catalyst [at] lists
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst [at] lists/ Dev site:
>> http://dev.catalyst.perl.org/
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


paulm at paulm

May 21, 2009, 5:08 PM

Post #6 of 6 (786 views)
Permalink
Re: 15s latency with fastcgi+Apache2+catalyst 5.8 [In reply to]

On Tue, May 19, 2009 at 5:49 PM, Paul Makepeace <paulm [at] paulm> wrote:
> IDL::Web is using the deprecated Catalyst::Base, update your
> application as this will be removed in the next major release at
> /usr/share/perl5/Catalyst/Base.pm line 7.
>
> Catalyst::Base doesn't appear in our app anywhere(?!)

Turns out this was due to DefaultEnd which inherits from
Catalyst::Base. Putting,

sub end : ActionClass('RenderView') {}

and changing config->{view} to config->{default_view} in our App.pm
seems to have sorted it.

Paul

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.