[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapd hangs for 5 seconds when doing successive connections : SOLVED

Le lun 15/09/2003 à 17:15, Olivier Berger a écrit :
> Hi.
> I'd like to ask for help on the following problem, which I suspect may
> correspond to a buggy behaviour of slapd. Although I spent quite some
> time trying to isolate the issue, I can't figure out what to do to solve
> it :(


I managed to solve that problem.

Actually, I've been too dumb to try and pass the client program through
dbg (or strace) to better understand where the problem came from, before
today :(

And the problem has nothing to do with slapd actually : only a
resolv.conf misconfiguration.

Sorry for disturbing with my post.

Actually when interrupting the program under the debugger, I can see
that it's waiting for these 5 seconds in libc6 waiting for a connection
to... not LDAP, but... the DNS (which was misconfigured, and then
results in a timeout sometimes... maybe as an anti DOS feature somewhere

I isolated the problem to be residing actually in the glibc : even
though I specified I wanted to connect to localhost, the getaddrinfo()
call in the libldap, results in querying all possible IP addresses
sources, which are in my case, /etc/hosts and the DNS (as specified in
/etc/nsswitch.conf)... and as the DNS declaration is bogus, there
happens some timeouts from time to time.

In the stable Debian distribution, the glibc seems to be somehow less
smart than the one in the "testing" version (2.3.1) in this respect. It
seems the "testing" version of the glibc won't actually query the DNS if
localhost was found in /etc/hosts, in getaddrinfo(). This seems to be a
pending bug/feature debate for the glibc in Debian for more than a year

My advice on this one : better check your resolv.conf whenever some
strange timeout occurs ;)

I hope my explanations may help someone having the same problem and
browsing the archives of that list.

Best regards,
Olivier BERGER <olivier.berger@int-evry.fr>
Ingénieur Recherche - Dept INF
INT Evry (http://www.int-evry.fr)
OpenPGP-Id: 1024D/6B829EEC