Hi,
I have a problem with an OpenLDAP server version 2.3.30. It is configured with many databases (more than 100), and when I try a search I get this error message: bdb_locker_id: err Cannot allocate memory(12)
I tried to play with different parameters of DB_CONFIG (locks, cache_size, etc.) and slapd.conf (threads in particular) but without any result.
Looking at the code I found that the function ldap_pvt_thread_pool_setkey (where it seems the error is from) doesn't allocate memory, but uses a fixed size table ctx of length MAXKEYS. Do you think I need to increase the MAXKEYS value, or that the problem is from somewhere else?
Thanks in advance for your help, Raphaël Ouazana.
Raphaël Ouazana-Sustowski wrote:
Hi,
I have a problem with an OpenLDAP server version 2.3.30. It is configured with many databases (more than 100), and when I try a search I get this error message: bdb_locker_id: err Cannot allocate memory(12)
I tried to play with different parameters of DB_CONFIG (locks, cache_size, etc.) and slapd.conf (threads in particular) but without any result.
Looking at the code I found that the function ldap_pvt_thread_pool_setkey (where it seems the error is from) doesn't allocate memory, but uses a fixed size table ctx of length MAXKEYS. Do you think I need to increase the MAXKEYS value, or that the problem is from somewhere else?
Seems like increasing MAXKEYS will make a difference here. However, that pool_setkey/getkey code uses a simple linear search to deal with keys. It won't perform very well with huge numbers of them.
Thanks in advance for your help, Raphaël Ouazana.
openldap-software@openldap.org