[Catalyst] Catalyst test server response times.
Peter Edwards
peter at dragonstaff.com
Wed Jan 30 16:00:21 GMT 2008
Hi Ian
>doing a 'host' command on an IP address works instantly and the contents of
the /etc/resolv.conf file
>look to be correct.
>
>Could it be a problem with specific IP addresses rather than with the
nameservers? (I can't cause
>a problem manually with the IP addresses I know the Catalyst app is run
from).
There are a few things you could try to narrow the problem.
1. You're definitely running the server without flags? i.e.
$ perl script/myapp_server.pl
The -k and -d flags slow it down a lot.
2. You've got the latest code?
$ cpan Catalyst::Devel
3. Use the debugger to see where the program is
$ perl -d script/myapp_server.pl
Fire up a request from your browser. If it's slow, press CTRL-C to break in
the debugger and use 'v'iew, '.' and 'T'race to see where you are. It may
seem hit and miss but it's a quick way to see where the program is at. You
can use 'c'ontinue to complete dispatching. Some more notes at
http://catwiki.toeat.com/fromtrac/debugsample
4. Use DProf to profile a couple of requests.
$ PERL5OPT=-d:DProf perl script/myapp_server.pl
Do a few requests in your browser
$ dprofpp
Will show you which routines are eating up time.
5. Use a browser debugging tool like Fiddler2 in IE
http://www.fiddlertool.com/fiddler/ or Charles in FF
http://www.xk72.com/charles/ if you suspect there's some browser <-> server
idiocy going on. See when the request is sent, see when the header comes
back. See how long it takes to get the ancillary .css .js .jpg files.
That will indicate whether it's a network problem, the server, or simply
slow javascript.
Regards, Peter
http://perl.dragonstaff.co.uk
More information about the Catalyst
mailing list