citserver fails to start, and an error message like "DB: Lock table is out of available object entries" appears in the log

This issue only applies to very old installations still running the legacy Berkeley DB backend. Modern Citadel installations use LMDB, which does not require lock table tuning and will never encounter this error.

If you are running a legacy system with Berkeley DB and have a fairly large database, you can tune the lock configuration to resolve the problem.

Here is how the error typically appears in your log:

  2007/07/06 22:52:57.745730 DB: Lock table is out of available object entries
  2007/07/06 22:52:57.745923 cdb_next_item(2): Cannot allocate memory

To resolve this, create a file called DB_CONFIG in your data directory (such as /usr/local/citadel/data). In it, add the following lines:

  set_lk_max_locks 2000
  set_lk_max_lockers 2000
  set_lk_max_objects 2000

Each of the above items is set to 1000 by default, so 2000 is a good place to start; increase by 1000 until the system starts and runs properly.

For more details, read about sizing your system in the Berkeley DB reference guide.