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

Re: openldap hangs on bdb / database corruption

Hash: SHA1

Ingo Steuwer wrote:
| Hi
| 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).

Is that db-4.2.52 or or ? You need at least

|>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.

Looks like you might be exceeding 2GB of transaction logs which are in use.

| 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
| it.
| 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.
| Thanks
| Ingo Steuwer
| relevant configruation-parts:
| slapd.conf:
| ---------------------------------------------------
| sizelimit               unlimited
| modulepath      /usr/lib/ldap
| moduleload      back_bdb.so
| database        bdb
| cachesize       500000
| index
| objectClass,uidNumber,gidNumber,memberUid,ou,uniqueMember pres,eq
| index           uid,cn,sn,givenName,mail,description,displayName
| pres,eq,sub
| index           sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
| index           default sub
| ---------------------------------------------------

You don't appear to have a checkpoint setting, which would mean that all
your transaction logs are open (or something to that effect, based on
what I've seen).

| --------------------------------------------------
| set_cachesize 0 536870912 1
| ---------------------------------------------------

Without some log transaction settings, your machine must be doing a lot
of IO all the time ... and write performance must be quite bad ...


- --
Buchan Milne                      Senior Support Technician
Obsidian Systems                  http://www.obsidian.co.za
B.Eng                                RHCE (803004789010797)
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org