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

Re: Long slapd shutdown times



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.
http://www.openldap.org/lists/openldap-devel/200407/msg00017.html
http://www.openldap.org/lists/openldap-devel/200407/msg00051.html


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:
http://www.openldap.org/lists/openldap-devel/200407/msg00068.html


This question was also discussed on this mailing list a couple months ago
http://www.openldap.org/lists/openldap-software/200411/msg00272.html

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