[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Checkpoint command not working in slapd.conf?
--On Tuesday, January 18, 2005 11:41 AM +1100 Dave Horsfall
<daveh@ci.com.au> wrote:
OpenLDAP 2.2.17 on FreeBSD 4.10-STABLE (compiled from ports).
I know it's not the latest, but using 2.2.19 is not an option right now.
because it wants a new OpenSSL etc, which will cause "issues".
Actually 2.2.20 is the latest.
Having been bitten by not detecting a corrupt (test) database, I figured
I may as well set things up properly, including checkpointing.
Extract from slapd.conf:
database bdb
include /usr/local/etc/openldap/master.acl
suffix "dc=au,dc=company,dc=com"
rootdn XXX
rootpw XXX
checkpoint 1024 5 <<<----------------------------
directory /usr/local/openldap-data/au
cachesize 2000
I understand that this means to checkpoint if updates have been performed
since 1024kb or 5 minutes after the last checkpoint (and I assume this
includes since the DB was started, as otherwise it would never checkpoint
at all).
No, they will occur if that much activity has happened since the last write
was received (this will be fixed in 2.3 to do what you think it does).
DB_CONFIG:
#
# Size of internal cache; the format is Gb + b, no. caches.
# 4Mb is plenty for our relatively teensy directories.
#
set_cachesize 0 4194304 1
So, I make a trivial update, observe that the "__db" files and log have
been updated, and twiddle my thumbs for 5 minutes. Nope. After 10
minutes, I force a checkpoint with "db_checkpoint".
I do it again, just to be sure. Below, you can see the forced checkpoint
at 10:17, and the second update at 10:19.
guido:/var/db/openldap-data/au [30]# ls -lt
total 8188
-rw------- 1 ldap ldap 368640 Jan 18 10:19 __db.004
-rw------- 1 ldap ldap 5251072 Jan 18 10:19 __db.002
-rw------- 1 ldap ldap 98304 Jan 18 10:19 __db.003
-rw------- 1 ldap ldap 24576 Jan 18 10:19 __db.005
-rw------- 1 ldap ldap 8192 Jan 18 10:19 __db.001
-rw------- 1 ldap ldap 5539588 Jan 18 10:19 log.0000000001
-rw------- 1 ldap ldap 1392640 Jan 18 10:17 id2entry.bdb
-rw------- 1 ldap ldap 327680 Jan 18 09:56 dn2id.bdb
-rw------- 1 ldap ldap 110592 Jan 17 13:51 objectClass.bdb
-rw------- 1 ldap ldap 24576 Jan 15 16:50 uid.bdb
-rw------- 1 ldap ldap 36864 Nov 19 12:34 cn.bdb
-rw------- 1 ldap ldap 24576 Nov 18 15:00 employeeNumber.bdb
-rw------- 1 ldap ldap 28672 Nov 18 15:00 sn.bdb
-rw------- 1 ldap ldap 8192 Nov 18 15:00 ciHost.bdb
-rw------- 1 ldap ldap 40960 Nov 18 15:00 ciApp.bdb
lrwxrwxr-x 1 root ldap 12 Oct 27 15:36 DB_CONFIG@ -> ../DB_CONFIG
guido:/var/db/openldap-data/au [30]# date
Tue Jan 18 10:59:17 EST 2005
Yep; 40 minutes later, and it still hasn't checkpointed... Googling
around turned up nothing relevant, and I even checked the back-bdb
sources to make sure the option was being picked up (it was) and
txn_checkpoint() being called after an update (it was).
What dumb thing have I done (or not done)?
Nothing, but if you read the list regularly, this issue has been discussed
several times this month. You need to add a checkpoint cron job or
something similar until 2.3 is released.
--Quanah
--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin