Univention Bugzilla – Bug 56472
syslog: mdb_id2entry_put: mdb_put failed: MDB_MAP_FULL
Last modified: 2023-08-28 08:32:50 CEST
Bug 56471 from Ticket#2023081821000192 shows a case where the mdb check /usr/lib/nagios/plugins/check_univention_slapd_mdb_maxsize didn't show any problems, but LDAP modify operations like group membership changes aborted with === ldap_modify: Other (e.g., implementation specific) error (80) additional info: entry update failed === and syslog showed: === Aug 22 10:54:32 backup03.domain.net slapd[12789]: mdb_id2entry_put: mdb_put failed: MDB_MAP_FULL: Environment mapsize limit reached(-30792) "cn=SOMERDN,cn=groups,ou=SOMEOU,$ldap_base" === We should add a check e.g. to system diagnostics to discover this situation.
Additionally syslog had lines like these, maybe unrelated: === Aug 22 10:53:49 backup03.domain.net slapd[12789]: conn=82351 op=362: memberof_value_modify DN="uid=SOMEUSER,cn=lehrer,cn=users,ou=SOMEOU,$ldap_base" add memberOf="cn=SOMEGROUP1,cn=klassen,cn=schueler,cn=groups,ou=SOMEOU2,$ldap_base" failed err=32 Aug 22 10:53:49 backup03.domain.net slapd[12789]: conn=82351 op=362: memberof_value_modify DN="uid=SOMEUSER2,cn=lehrer,cn=users,ou=SOMEOU,$ldap_base" add memberOf="cn=SOMEGROUP1,cn=klassen,cn=schueler,cn=groups,ou=SOMEOU2,$ldap_base" failed err=20 Aug 22 10:53:53 backup03.domain.net slapd[12789]: conn=82351 op=388: memberof_value_modify DN="uid=SOMEUSER3,cn=schueler,cn=users,ou=SOMEOU,$ldap_base" delete memberOf="cn=SOMEGROUP2,cn=klassen,cn=schueler,cn=groups,ou=SOMEOU3,$ldap_base" failed err=16 ===
Affected system types: * Backup Directory Node (not Primary) Affected groups and sizes: * cn=Windows Hosts (over 18000 memberUids) * cn=computers (about 1000 memberUids) * Some other group The systems where set to ldap/database/mdb/maxsize: 34359738368 ## == 32GiB The data.mdb had 34359693312 bytes. root@backup03: mdb_stat -ef /var/lib/univention-ldap/ldap.MDB_MAP_FULL Environment Info Map address: (nil) Map size: 34359738368 Page size: 4096 Max pages: 8388608 Number of pages used: 8388597 Last transaction ID: 21958081 Max readers: 126 Number of readers used: 0 Freelist Status Tree depth: 3 Branch pages: 16 Leaf pages: 2922 Overflow pages: 19096 Entries: 25500 Free pages: 7330224 Status of Main DB Tree depth: 2 Branch pages: 1 Leaf pages: 4 Overflow pages: 0 Entries: 128
This is how we fixed it: ========= root@backup03:~/univention-support # cat replace-copy-ldap-mdb.sh #!/bin/bash REPLY="no" while [ "$REPLY" != YES ]; do read -p "REALLY RUN THIS?" done set -v /etc/init.d/univention-directory-listener stop /etc/init.d/slapd stop mkdir /var/lib/univention-ldap/ldap2 time mdb_copy -c /var/lib/univention-ldap/ldap /var/lib/univention-ldap/ldap2 cp /var/lib/univention-ldap/ldap/DB_CONFIG /var/lib/univention-ldap/ldap2 mv /var/lib/univention-ldap/ldap /var/lib/univention-ldap/ldap.MDB_MAP_FULL mv /var/lib/univention-ldap/ldap2 /var/lib/univention-ldap/ldap chown -R openldap.openldap /var/lib/univention-ldap/ldap /etc/init.d/slapd start /etc/init.d/univention-directory-listener start ========= After that the data.mdb had 4GB.