Symas employee?Sign in

← Knowledge Base

Installation → Troubleshooting

How to Fix MDB Map Full Error

Date: 11-04-2022

Overview

The MDB backend requires a setting called maxsize/olcDbMaxSize, which sets the maximum on-disk size (in bytes) of its data.mdb file. When the amount of data inside the data.mdb file reaches the maximum size, the MDB database will no longer accept any writes.

If slapd refuses to add/modify entries, check the slapd logs for the following error message:

MDB_MAP_FULL: Environment mapsize limit reached (-30792)

If this message is present, you must increase the value of the maxsize/olcDbMaxSize setting to allow for more data to be added.

Increasing olcDbMaxSize (cn=config)

Create the following .ldif file:

# File: UpdateDbMaxSize.ldif
#
dn: olcDatabase={N}mdb,cn=config
changetype: modify
replace: olcDbMaxSize
olcDbMaxSize: 
-

The {N} represents the database number in the slapd configuration directory.

Use the ldapmodify command to set the new value in the configuration:

ldapmodify -xH ldap:/// -D dc=example,dc=com -W -f UpdateDbMaxSize.ldif

The setting takes effect immediately and does not require a restart of slapd or a reload of the backend database.

Increasing maxsize (slapd.conf)

  1. Open the slapd.conf configuration file
  2. Update the value of the maxsize setting with the new value in bytes
  3. Test the configuration change with the slaptest utility:
slaptest -vf /opt/symas/etc/openldap/slapd.conf
  1. If slaptest succeeds, restart the slapd daemon/service; the change will not take effect until this is done.
systemctl restart slapd

See Also