[Catalyst] C::Engine::HTTP taking very long

Terence Monteiro terence at deeproot.co.in
Mon Apr 20 09:35:05 GMT 2009


I'm getting very high times when running my Catalyst application in
standalone mode. I used Devel::NYTProf and zeroed in on a few subs in
Catalyst::Engine::HTTP which take long:

Catalyst::Engine::HTTP::_socket_data: 678s(exclusive)   678s(inclusive)
Catalyst::Engine::HTTP::run:    55.5s(exclusive)        735s(inclusive)
Catalyst::Engine::HTTP::_handler:       12.5ms(exclusive)       679s(inclusive)

On closer inspection of _socket_data, I find the following taking lots of
time (678 seconds):

        519                             my $data = {
        520                             peername => $iaddr
        521                             ? ( gethostbyaddr( $iaddr, AF_INET ) || 'localhost'
        )
        522                             : 'localhost',
        523                             peeraddr => $iaddr
        524                             ? ( inet_ntoa($iaddr) || '127.0.0.1' )
        525                             : '127.0.0.1',
        526                             localname => gethostbyaddr( $localiaddr, AF_INET ) || 'localhost',
        527                             localaddr => inet_ntoa($localiaddr) || '127.0.0.1',

In the run subroutine, the following takes long (55 seconds):

        254                                     while ( accept( Remote, $daemon ) ) {

My Perl package versions are:

        Catalyst::Action::RenderView version: 0.04
        Catalyst::Runtime version: 5.71001
        Catalyst::Model::Adaptor version: 0.03
        Catalyst::Plugin::ConfigLoader version: 0.23
        Catalyst::Plugin::Session version: 0.20
        Catalyst::Plugin::Session::State::Cookie version: 0.10
        Catalyst::Plugin::Session::Store::FastMmap version: 0.07
        Catalyst::Plugin::Static::Simple version: 0.21
        Catalyst::Plugin::Authentication version: 0.10011
        Catalyst::Plugin::Authentication::Store::LDAP version: 0.0601
        Catalyst::Plugin::RedirectAndDetach version: 0.03
        Catalyst::Plugin::Prototype version: 1.33
        Catalyst::View::TT version: 0.29
        Config::General version: 2.42
        Mail::Box version: 2.088
        Moose version: 0.74
        parent version: 0.221
        IO::Simple version: 0.04
        Template::Plugin::Page version: 0.10
        Template::Plugin::Date version: 2.77

Am I missing something or is this a bug?

-- 
Regards, Terence.
http://www.deeproot.in 
Ph: +91 (80) 4089 0000




More information about the Catalyst mailing list