[CentOS] differences in DNS between boxes

Matty matty91 at gmail.com
Tue Aug 4 22:55:01 UTC 2009


On Tue, Aug 4, 2009 at 5:54 PM, Mike -- EMAIL
IGNORED<m_d_berger_1900 at yahoo.com> wrote:
> On Tue, 04 Aug 2009 21:31:22 +0200, Kai Schaetzl wrote:
>
>> Mike -- EMAIL IGNORED wrote on Tue, 4 Aug 2009 16:56:22 +0000 (UTC):
>>
>>> Please refer to my thread "excessive DNS slows httpd"
>>
>> Why don't you keep posting in there then?
>
> Because the new title reflects a new focus, and I hoped
> to attract different people.
>
>>
>>> Suggestions would be most welcome.
>>
>> Foremost, you want to find out why those queries are generated despite
>> the fact that hostnamelookups are off. That is surely something in your
>> configuration or a web application. It's not a general problem of Apache
>> on CentOS, mine are all not doing that.
>>
>> Kai
>
> Until now, for a long time, mine wasn't doing it either.
>
> Part of the problem was suggested by someone on the Apache group;
> there are two problems:
>
> 1. Both boxes have nscd, but it was not running on the CentOS
>   box.  Now that I fixed that, all but the first connection
>   are rapid, as you might expect.
>
> 2. We still do not why the change in httpd.conf caused the
>   problem to appear.  However, my belief that there was a
>   difference between the two machines is accounted for
>   by the difference in /etc/init.d/nscd . When I tried it
>   for the first time this morning, the box that previously
>   been fast was slow.  No doubt, the nscd storage had
>   timed out.
>
> Except that nscd was not set to run, it is probably not
> specifically a CentOS problem.  Perhaps I made a wrong
> choice in setup?

If you are uncertain where the DNS lookups are originating from, you
could always add an interposer between Apache and glibc. When the
culprit calls one of the get* routines, you could log a backtrace to a
file. Summarizing the backtraces should lead you to the modules (and
directives) responsible for the lookups. If you happen to have a
Solaris 10 / OpenSolaris host handy, you can use the DTrace ustack()
action to do just this. No need to muck around with interposing on the
glibc calls.

Hope this helps,
- Ryan
--
http://prefetch.net



More information about the CentOS mailing list