7.3 + kqueue + apache/php + DNS lookup problem
Michiel Boland
michiel at boland.org
Sun Oct 2 13:31:04 UTC 2011
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
More information about the freebsd-stable
mailing list