In our company we use OpenLDAP to store user accounts and other data.
There is one main database, and many glued subordinate databases for replicated (from filials) data. All databases use back-hdb backend.
Without editing ./openldap-2.4.19/librares/libldap_r/tpool.c file in sources (line 45):
#define MAXKEYS 32
after creating 33-th hdb database slapd start work unstable. And there error:
bdb_reader_get: err Cannot allocate memory(12)
in log file.
Becauthe of this i'm chenge this default value to 256. And all working.

I hav two questions:
1. What role of this option? What else can affect my change?
Is it possible to make MAXKEYS option configurable without editing sources or simple enlarge it?

Thanks for responce.

P.S. Excuse my English, it isn't my primary language.

С уважением,
специалист отдела 
системного администрирования
Департамента ИТ ЗАО "Тандер"
Кардаш Павел Александрович
тел. (861)210-98-10 доб.4055