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

Re: openldap (or is it nss_ldap?) not answering



Quanah Gibson-Mount wrote:



--On Thursday, November 11, 2004 9:00 PM +0100 Stefano Maffulli <smaffulli@gmail.com> wrote:

Hello all,

I have installed a mail server with real users, stored in openldap.
The dovecot server sometimes hangs waiting for an answer from ldap, an
answer that doesn't come.  The openldap server does not crash, it just
sits there.  A restart of the slapd server makes everything work
again.

The system is a dual Xeon, fast raid disks and serves only ~70 users.
It is running debian-unstable, openldap 2.1 with ldbm backend.  All
default values from debian install, I didn't tweak cache nor threads
in slapd.conf.

Three points:
1) OpenLDAP 2.1 is now historic, no longer recommended or supported.
2) ldbm backend has pretty much zero concurrency. Any single request that takes a long time to process will cause all subsequent requests to hang until they each get their turn to be processed.
3) when enough requests are waiting to progress, slapd may stop listening for new requests.


Conclusions:
1) there may be a bug in the version of OpenLDAP you're running that causes things to hang. It is likely that the bug is fixed in OpenLDAP 2.2. If you find that the bug does exist in 2.2, it is probable that it will get fixed if you file an ITS on it. But any such fix will never be backported to 2.1, and bugs reported against 2.1 (and older) are now categorically ignored.
2) even when everything is working correctly, using back-ldbm exposes you to the possibility of these hangs occurring from time to time.
3) if you want excellent performance you should use back-bdb or back-hdb, and you cannot run with the default settings unless your total database is about 512KB or less.


When this happens, can you run a manual ldapsearch of the server (i.e., does slapd respond to your queries?). If not, it sounds like slapd is experiencing some type of lockup, which would be problematic. You shouldn't have to restart slapd to get it to be responsive again.



-- -- Howard Chu Chief Architect, Symas Corp. Director, Highland Sun http://www.symas.com http://highlandsun.com/hyc Symas: Premier OpenSource Development and Support