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

Re: DB_CONFIG causes bdb_db_init FATAL or PANIC error, renaming it helps

Tay, Gary wrote:

I'm using OpenLDAP 2.2.13 with BDB 4.2.52, and I notice that this "Bug"?

On a testing server, whenever I stop the LDAP server, clean up *.bdb, __db.* and log.*, and try to rebuild the LDAP server, I am always frightened by FATAL or PANIC errors, something like:

bash-2.05# /usr/local/libexec/slapd -d 10 -u ldap -h "ldap:/// ldaps:///"
bdb_initialize: Sleepycat Software: Berkeley DB 4.2.52: (December 3, 2003)
bdb_db_init: Initializing BDB database
bdb(dc=example,dc=com): PANIC: fatal region error detected; run recovery
bdb_db_open: dbenv_open failed: DB_RUNRECOVERY: Fatal error, run database recovery (-30978)
backend_startup: bi_db_open(0) failed! (-30978)
bdb(dc=example,dc=com): txn_checkpoint interface requires an environment configured for the transaction subsystem
bdb_db_destroy: txn_checkpoint failed: Invalid argument (22)
slapd stopped.
connections_destroy: nothing to destroy.

I have to temporarily renamed DB_CONFIG before the rebuild and rename it back after the rebuild, just to get around it.

Anyone experienced this and reported this as a bug? Or know why went wrong?

Content of DB_CONFIG:
set_cachesize 0 209715200 0
set_lg_regionmax        131072
set_lg_bsize            2097152

RAM of LDAP Server: 640MB


Most likely you don't have enough free memory to accomodate the cache size you've chosen. By renaming the file and starting up, the BDB library creates an environment of its default size. Renaming back to DB_CONFIG after the environment has been created will have no effect on the cache or log settings. Use a smaller cache, get some more RAM, or kill whatever other programs are running that are using up the rest of your memory.

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