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

DB_CONFIG tuning

Hi All-

I was hoping someone would know what's up with my DB_CONFIG foo, as it doesn't seem to be working at all... I'm running OpenLDAP 2.3.19-4. Basically I've set up my LDAP database and all is well, it accepts queries, things are good. Then I think to myself, "I could really use some caching...", so I configured DB_CONFIG, threw it in my /var/lib/ldap directory and tried to start slapd. slapd refuses to start now... Here's my DB_CONFIG:

# Set the database in memory cache size.
set_cachesize   0       100428800        0

# Set database flags.
# (for database loading/reindexing)
#set_flags       DB_TXN_NOSYNC

# Set log values.
set_lg_regionmax        1048576
set_lg_max              10485760
set_lg_bsize            2097152
set_lg_dir              /var/log

I have "cachesize 100000" in /etc/openldap/slap.conf as well. When I try to start slapd in debug mode, I get this before it fails to launch:

backend_startup_one: starting "cn=config"
backend_startup_one: starting "dc=domain,dc=com"
bdb_db_open: dc=domain,dc=com
bdb_db_open: dbenv_open(/var/lib/ldap)
bdb(dc=domain,dc=com): file id2entry.bdb (meta pgno = 0) has LSN [3][9675949].
bdb(dc=domain,dc=com): end of log is [1][7406505]
bdb(dc=domain,dc=com): /var/lib/ldap/id2entry.bdb: unexpected file type or format
bdb_db_open: db_open(/var/lib/ldap/id2entry.bdb) failed: Invalid argument (22)
====> bdb_cache_release_all
bdb(dc=domain,dc=com): Unknown locker ID: 0
backend_startup_one: bi_db_open failed! (22)
slapd shutdown: initiated
====> bdb_cache_release_all
bdb_db_close: alock_close failed
slapd destroy: freeing system resources.
slapd stopped.

Again, it works fine when DB_CONFIG isn't there... but this server will probably be hit very hard in the future so I'd like the database to reside in memory as much as possible for performance reasons... Does anyone have an idea of what might be causing this?

Thanks in advance for any advice!

ciao, erich