Date: Sun, 02 Oct 2011 15:17:03 +0200 From: Michiel Boland <michiel@boland.org> To: freebsd-stable@freebsd.org Subject: Re: 7.3 + kqueue + apache/php + DNS lookup problem Message-ID: <4E88644F.4040001@boland.org> In-Reply-To: <4E883890.4020704@infracaninophile.co.uk> References: <4E865146.8090108@FreeBSD.org> <20111001003735.GA28346@icarus.home.lan> <4E866A70.8060203@FreeBSD.org> <4E883890.4020704@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/02/2011 12:10, Matthew Seaman wrote: > On 01/10/2011 02:18, Doug Barton wrote: >>> Does this happen when httpd tries to do DNS resolution for, say, an >>>> incoming connection to the web server (e.g. trying to resolve the >>>> incoming IP address of the client to an FQDN), or is it happening within >>>> some PHP code (assuming PHP is installed/used as an Apache module) >>>> that's trying to do DNS resolution of some kind? > >> It's a php module doing a lookup for the hostname of the back-end mysql >> server. > > Hmmm... Is this a function of DNS traffic being via UDP? Presumably > you're not seeing the same sort of delays when eg. apache connects to > mysql via TCP. > > Hard to think of another UDP protocol you could use to test -- SNMP > perhaps? Or somehow forcing the DNS traffic to go via TCP? Tricky to > make that happen when the resolver is on localhost. Of course, since > DNS will only fall back to TCP after trying UDP, that's going to be even > slower overall than your current situation, but the point here is to > examine the truss output for timing details specifically around where > the TCP query is issued. > > Cheers, > > Matthew > What is the exact query issued and what was the response? I see recvfrom returned 30 bytes in Doug's original mail which seems awfully short for a meaningful DNS response. Cheers Michiel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E88644F.4040001>