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

openldap hangs on bdb / database corruption


I'm using openldap 2.1.30 and bdb 4.2.52 from the latest debian-sources
with a somewhat large ldap (about 100.000 entries).

>From time to time the database seems to hang, ldapsearch gets no answers
and even db4.2_stat hangs at some point (needs kill -9 then). In this
cases I need to stop slapd and do a db4.2_recover.

During this hangs one or more slapd-processes runs with full CPU-Usage.
Last time this happens I was generating a new index with slapindex.
Normaly this process grows quickly to 400Megs of memory-usage, in this
case it hangs around with 22Megs and 99%CPU for an hour bevor I killed

strace on this process says "sched_yield()  0" endless times. After a
db_recover (I saved all bdb-logfiles) everything runs fine again.

During my tests with this installation I had to do several db_recover,
which sometimes failed to rebuild the Database completely --  I even
missed cn=admin one time. This may be caused by some log-caching
settings in DB_CONFIG which are removed now.

Maybe someone can give me some hints about known bugs in BDB/openldap or
problems in my configuration. If you need more information let me know.

Ingo Steuwer

relevant configruation-parts:

sizelimit               unlimited
modulepath      /usr/lib/ldap
moduleload      back_bdb.so

database        bdb

cachesize       500000
objectClass,uidNumber,gidNumber,memberUid,ou,uniqueMember pres,eq
index           uid,cn,sn,givenName,mail,description,displayName
index           sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
index           default sub

set_cachesize 0 536870912 1