Apache Perl/PHP/proxy DNS lookup failures

"Alex J. G. Burzyński" ajgb at ajgb.net
Mon Dec 20 15:09:54 GMT 2010


How about running a DNS cache on your web server(s)?



On 20/12/10 14:52, Bob MacCallum wrote:
> Hi,
> I know the cool cats don't use Apache httpd any more, but maybe someone can
> help anyway..?
> We (non-profit bioinformatics site maintainers) are seeing regular
> intermittent DNS lookup failures from mod_perl, php and mod_proxy.  Once the
> error appears it keeps occurring until you restart apache, even though on
> the commandline the hosts can be looked up and contacted fine (e.g. with
> ping).  We've googled the error messages many times, and we're not the first
> to experience this [1,2] - for many it seems to happen when DHCP leases are
> renewed on home ADSL connections, and they are happy to restart Apache.
> Looking at our resolv.conf timestamps, however, DHCP renewal doesn't seem to
> be the problem.
> One of my colleagues hacked a version of LWP (which was failing in one web
> app running in mod_perl) to use Net::DNS::Resolver instead of gethostbyname
> and that seemed to work, but the problems are so widespread (database
> hostname lookup in php, ProxyPass back-end lookup in Apache) that patches
> like this are clearly not addressing the root cause.
> The hardware is Mac running Darwin Kernel Version 9.8.0
> Server version: Apache/2.2.15 (Unix)
> Server built:   Oct 14 2010 16:41:03
> I'm not the main admin for this machine, so I don't know much about the DNS
> and DHCP setup, but can find out, of course.
> Thanks for reading!  Any ideas?
> cheers,
> Bob.
> [1] PHP:
> http://www.google.co.uk/search?q=Temporary+failure+in+name+resolution
> [2] Perl: http://www.perlmonks.org/index.pl?node_id=333632

More information about the london.pm mailing list