You notice a message from OpenLDAP MDB_MAP_FULL and your see related entries in /var/log/syslog:
MDB_MAP_FULL: Environment mapsize limit reached

Or maybe you find something like this in the listener.log:
ldapError: Other (e.g., implementation specific) error: entry update failed
this also means the maxium databasesize is reached

In the listener.log you may see:
LISTENER ( ERROR ) : couldn't receive header
Could be an indication of the mdb size full, too.


Check the usage percentage of the database to verify it is close to 100%:

root@master:~# for i in /var/lib/univention-ldap/ldap /var/lib/univention-ldap/translog  /var/lib/univention-directory-listener/cache; do 
used_pages=$(mdb_stat -e $i | sed -n 's/^ *Number of pages used: //p') 
max_pages=$(mdb_stat -e $i | sed -n 's/^ *Max pages: //p') 
python -c "print('In $i are %.1f percent used' % (float($used_pages) / $max_pages * 100))" 
In /var/lib/univention-ldap/ldap are 0.4 percent used
In /var/lib/univention-ldap/translog are 0.2 percent used
In /var/lib/univention-directory-listener/cache are 99.5 percent used


Option 1

UCS uses three mdb databases. If it is a 64-bit system, the maximum size of the database can be increased. This should be done on all Master, Backup and Slave servers. The default value in UCS 4.x is 2147483648 bytes = 2 GB:

ucr set ldap/database/mdb/maxsize=3000000000
ucr set listener/cache/mdb/maxsize=3000000000
systemctl restart slapd
systemctl restart univention-directory-listener

Read the comments from man slapd-maxsize regarding this parameter. Setting it too high might increase memory usage.
The MDB database is not “enlarged” when the LDAP server is restarted but only at the next access (write).

maxsize <bytes>
Specify the maximum size of the database in bytes. A memory map of this size is allocated at startup time and the database will not be allowed to grow beyond this size. The default is 10485760 bytes. This setting may be changed upward if the configured limit needs to be increased.

Option 2

With UCS 4.4-0e81 we introduced a new tool to reduce the translog database. So instead of increasing the size of the database you might purge old entries instead.
Please see this article for details:

/usr/share/univention-directory-notifier/univention-translog [-v] prune <TID>
Note: Old entries are usually not needed any more as the matching transction has already taken place a while ago. Usually it is safe to purge them.

ldapError: Other (e.g., implementation specific) error: entry update failed
MDB_MAP_FULL: Environment mapsize limit reached
LISTENER ( ERROR ) : couldn’t receive header

1 Like