[Catalyst] Catalyst test server response times.

Peter Edwards peter at dragonstaff.com
Wed Jan 30 11:48:03 GMT 2008


>> On Jan 30, 2008 9:14 AM, Ian Docherty <catalyst at iandocherty.com> wrote:
>>> It is frequently (but not always) taking 20 seconds or so to display a
>>> page in my browser
>>
>>Andrew wrote:
>> The only times I've had this happen, it's been DNS issues -- in my
>> case, dhcpd putting a duff entry in resolv.conf
>>
>> YMMV, but worth checking.
>YUP. turning debug mode off has a *big* difference.
>so, what is this reverse DNS thingy doing and how can I turn it off but 
>leave the other debug on?

Say your browser PC address is 192.168.1.2
Try typing on your Linux server
$ host 192.168.1.2
and see how long it takes to resolve.

If it's not almost instant, look at /etc/resolv.conf. If you're using DHCP,
that may put an incorrect nameserver entry in there.
For example, my router adds itself (192.168.1.1) as the first nameserver
although it will time out trying to resolve 192.168.1.2.

When that happens, the test server Catalyst::Engine::HTTP::_socket_data()
will wait to time out in the call to gethostbyaddr() while serving static
files.

Try removing any incorrect entries from /etc/resolv.conf so that the 'host'
command works quickly and it should be okay.
Unfortunately, every DHCP refresh will recreate the file so do "man
dhclient-script" and look at making an /etc/dhclient-exit-hooks to rewrite
the resolv.conf it creates.

Regards, Peter
http://perl.dragonstaff.co.uk





More information about the Catalyst mailing list