Date: Sun, 02 Oct 2011 11:10:24 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Doug Barton <dougb@freebsd.org> Cc: freebsd-stable@freebsd.org, Jeremy Chadwick <freebsd@jdc.parodius.com> Subject: Re: 7.3 + kqueue + apache/php + DNS lookup problem Message-ID: <4E883890.4020704@infracaninophile.co.uk> In-Reply-To: <4E866A70.8060203@FreeBSD.org> References: <4E865146.8090108@FreeBSD.org> <20111001003735.GA28346@icarus.home.lan> <4E866A70.8060203@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig53E550BC93E0603B67CCCE20 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 wi= thin >> > 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 --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig53E550BC93E0603B67CCCE20 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6IOJcACgkQ8Mjk52CukIwKWQCfUPe85Qs07MkU2GC4zfRkrTFv za4An0tWh7LsUuxdfbfVU40SLbEyo4ZM =71kT -----END PGP SIGNATURE----- --------------enig53E550BC93E0603B67CCCE20--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E883890.4020704>