mconstantine has asked for the wisdom of the Perl Monks concerning the following question:
I'm debugging a problem with a server running on OS X where HTTP requests receive a "500 DNS lookup timeout". There's nothing out of the ordinary with my network setup and my other services (ruby web servers, for instance) are communicating fine with the outside world.
I've traced the problem to this block of code in ParanoidAgent.pm:
# wait for the socket to become readable, unless this is from our test # mock resolver. unless ($sock && $sock eq "MOCK") { my $rin = ''; vec($rin, fileno($sock), 1) = 1; my $nf = select($rin, undef, undef, $self->_time_remain($reque +st)); die "DNS lookup timeout" unless $nf; }
If I comment out the die command, I find that the code never gets a readable socket. I could really use some Perl Wisdom on how to debug this further. What kinds of things can lead to socket problems? Other people running this server on similar hardware report no problems.
Any thoughts?
Much thanks,
Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with Sockets
by Corion (Patriarch) on Jul 24, 2009 at 14:43 UTC | |
by mconstantine (Initiate) on Jul 24, 2009 at 15:07 UTC | |
|
Re: Problem with Sockets
by Anonymous Monk on Jul 24, 2009 at 14:42 UTC |