[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: MDB_BAD_VALSIZE error



Chris Card wrote:
Hi All,

I'm running openldap 2.4.36 on centos 6.3, 64 bit.

I'm finally trying out MDB as a replacement for BDB in our openldap setup, and I've noticed that I'm getting MDB_BAD_VALSIZE errors when adding some DNs, which could be added without error when using BDB as the backend:

52e9170b <= mdb_dn2id_add 0x5da55e: -30781
52e9170b mdb_add: dn2id_add failed: MDB_BAD_VALSIZE: Too big key/data, key is empty, or wrong DUPFIXED size (-30781)

Looking at the code, it seems that this error happens when MDB_MAXKEYSIZE is exceeded and MDB_MAXKEYSIZE is set to 511 as far as I can see.

The DNs which are giving this error are between 232 and 255 characters long.

Does the MDB backend have an implicit limit on the length of valid DNs?

slapd has a limit of 8192 bytes on DNs. RDNs in back-mdb are limited by MDB_MAXKEYSIZE.

Can this be increased (by changing MDB_MAXKEYSIZE)  and if so, what is the longest DN which can be supported by the MDB backend?

The longest DN supported is 8192 bytes. The longest RDN would be something close to one half of MDB_MAXKEYSIZE.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/