5. Tuning the Number of Locks

The lock mechanisms control how many copies of the Directory Server process can be running at one. For example, if there is an import job, then a lock is placed in the imports/ directory to prevent any other ns-slapd (normal), ldif2db (another import), or db2ldif (export) operations from running. If the server is running as normal, there is a lock in the server/ directory, which prevents import operations (but not export operations), while if there is an export operation, the lock in the exports/ directory allows normal server operations but prevents import operations.
If there are error messages indicating that the lock table is out of available locks (for example, libdb: Lock table is out of available locks), double the value of the nsslapd-db-locks attribute in the cn=config,cn=ldbm database,cn=plugins,cn=config entry.
For example, if the current value is 10000, set it to 20000. If the problem persists, double the number again. To monitor the current and maximum number of locks, do a search on cn=database,cn=monitor,cn=ldbm database,cn=plugins,cn=config. For example:
ldapsearch -D "cn=directory manager" -W -p 389 -h server.example.com -x -sub -b "cn=database,cn=monitor,cn=ldbm database,cn=plugins,cn=config" objectclass=* | grep -- -locks: )
For more information on using LDAP utilities, see the Directory Server Administrator's Guide.