#5914 invalid setting of DS lock table size
Closed: Fixed None Opened 4 years ago by tbordaz.

Freeipa 4.3.90 - DS 1.3.4.9

The test case is:

Install ipa-server
create a DS backup - restore DS back
  # I use to restart from that backup so
  # I do not know if it participate to the test case
  # or if the failure also happen with a fresh install
Create a large provisioning file using default values of https://github.com/freeipa/freeipa-tools/blob/master/create-test-data.py
Stop IPA
Edit dse.ldif to 
   - set entry cache=200Mb
   - dbcache=100Mb
   - disable memberof (to accelerate the provisioning/error)
Start DS
ldapadd -D "cn=directory manager" -w xxx -f <provisioning_file>

Then 
 - monitor DS error log file
 - monitor db lock (ldapsearch -LLL -o ldif-wrap=no -D "cn=directory manager" -w xxx -b "cn=database,cn=monitor,cn=ldbm database,cn=plugins,cn=config" nsslapd-db-configured-locks nsslapd-db-current-locks nsslapd-db-max-locks)

After some time the following error appears

[24/May/2016:18:59:13 +0200] - libdb: BDB2055 Lock table is out of available lock entries
[24/May/2016:18:59:13 +0200] - idl_new.c BAD 60, err=12 Cannot allocate memory
[24/May/2016:18:59:13 +0200] - database index operation failed BAD 1130, err=12 Cannot allocate memory
[24/May/2016:18:59:13 +0200] - database index operation failed BAD 1140, err=12 Cannot allocate memory
[24/May/2016:18:59:13 +0200] - database index operation failed BAD 1230, err=12 Cannot allocate memory
[24/May/2016:18:59:13 +0200] - database index operation failed BAD 1042, err=12 Cannot allocate memory
[24/May/2016:18:59:13 +0200] - database index operation failed BAD 1040, err=12 Cannot allocate memory
[24/May/2016:18:59:13 +0200] - index_add_mods failed, err=12 Cannot allocate memory
[24/May/2016:18:59:31 +0200] - id2entry_add failed, err=12 Cannot allocate memory
...
[24/May/2016:18:59:31 +0200] - libdb: BDB2055 Lock table is out of available lock entries
[24/May/2016:18:59:31 +0200] id2entry - db error 12 (Cannot allocate memory)
[24/May/2016:18:59:31 +0200] - next_search_entry db err 12
[24/May/2016:18:59:31 +0200] id2entry - db error 12 (Cannot allocate memory)
[24/May/2016:18:59:31 +0200] - next_search_entry db err 12
[24/May/2016:18:59:31 +0200] - libdb: BDB2055 Lock table is out of available lock entries
[24/May/2016:18:59:31 +0200] id2entry - db error 12 (Cannot allocate memory)
[24/May/2016:18:59:31 +0200] - next_search_entry db err 12
[24/May/2016:18:59:31 +0200] - libdb: BDB2055 Lock table is out of available lock entries
[24/May/2016:18:59:31 +0200] id2entry - db error 12 (Cannot allocate memory)
[24/May/2016:18:59:31 +0200] - next_search_entry db err 12
[24/May/2016:18:59:31 +0200] - libdb: BDB2055 Lock table is out of available lock entries

...

The setting of the size of the db lock table

dn: cn=config,cn=ldbm database,cn=plugins,cn=config
nsslapd-db-locks: 10000  => failure
nsslapd-db-locks: 20000  => failure
nsslapd-db-locks: 100000 => success

The monitoring shows that 50000 could be enough.


mkosek: ok. FreeIPA 4.4 is about performance improvements, so adding the best known defaults would be nice. Who will do it, Thierry? We do not have much time left in 4.4.

tbordaz: there is no identified 'good' value (it basically depend how many entries will be imported), we can set a higher value just for safety in order to allow for example 100K entries import.

master:

  • 8e3b7b2 Increase nsslapd-db-locks to 50000

Metadata Update from @tbordaz:
- Issue assigned to stlaz
- Issue set to the milestone: FreeIPA 4.4

4 years ago

ipa-4-8:

  • 87e5c05 Fix nsslapd-db-lock tuning of BDB backend

Login to comment on this ticket.

Metadata