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

Re: Long slapd shutdown times

--On Thursday, February 17, 2005 4:18 AM -0800 Howard Chu <hyc@symas.com> wrote:

Audrius Valunas wrote:

slapd shutdown may take hours to complete. the backend in use is BDB
with berkley db version 4.2.52. The reason seems to bee flushing of
transactions logs or similar. db_archive while slapd running says that
ALL logs are still needed. And if wait for slapd to shutdown
db_archive allows removal of all of them but last.

Is this behaviour feature, bug or some misconfiguration of mine ?

You didn't mention which version of OpenLDAP you're using, but probably
all of the above:

misconfiguration: see the checkpoint directive in slapd-bdb(5).

feature: back-bdb uses a long-lived transaction for read operations, to
avoid a cache deadlock issue. All the details are in this email thread.

bug: BerkeleyDB 4.2 holds the transaction log open even if a transaction
hasn't done any writes. The long-lived read transactions that back-bdb
uses causes the db_archive behavior you're seeing. This bug is fixed in
BerkeleyDB 4.3, but as Quanah is quick to point out, BerkeleyDB 4.3 has
other problems. I posted a workaround here:

This question was also discussed on this mailing list a couple months ago

The BDB & OpenLDAP transaction patches are easily obtained from the Stanford Directory services webpage as well:



Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html