Insufficient free memory error when installing OpenDJ 3.5

Last updated Jan 5, 2021

The purpose of this article is to provide assistance if you encounter the following error when installing or upgrading to OpenDJ 3.5 using the setup command: "An error occurred while attempting to process the LDIF import: Insufficient free memory".


This article has been archived and is no longer maintained by ForgeRock.


The following error is shown when running the ./setup command to install or upgrade to OpenDJ 3.5:

[22/09/2016:12:11:57 +0000] category=BACKEND seq=21 severity=INFO msg=Import LDIF environment close took 0 seconds [22/09/2016:12:11:57 +0000] category=QUICKSETUP seq=72 severity=INFO msg=import-ldif out log: [22/09/2016:12:11:57 +0000] category=BACKEND seq=22 severity=INFO msg=Flushing data to disk [22/09/2016:12:11:57 +0000] category=QUICKSETUP seq=73 severity=WARNING msg=import-ldif error log: [22/09/2016:12:11:57 +0000] category=TOOLS seq=23 severity=SEVERE msg=An error occurred while attempting to process the LDIF import: Insufficient free memory (86113843 bytes) to perform import. At least 87293952 bytes of free memory is required [22/09/2016:12:11:57 +0000] category=QUICKSETUP seq=74 severity=SEVERE msg=Error: Error Creating Base Entry. [22/09/2016:12:11:57 +0000] category=QUICKSETUP seq=75 severity=SEVERE msg=Caught exception: Error Creating Base Entry. [22/09/2016:12:11:57 +0000] category=QUICKSETUP seq=76 severity=SEVERE msg=Error installing.

Recent Changes



The setup process launches a separate import-ldif process to create the baseDN and uses the default JVM parameters for this.

The JVM heap value being used is too small for the import-ldif process to complete. This can also happen if the server you are using has low memory (for example, a VM with only 1GB RAM) as the JVM automatically assigns a heap value based on the total memory available on the server.


This issue can be resolved as follows:

  1. Run ./setup without creating the baseDN entry (that is, exclude the --addBaseEntry or -a option) and include the --doNotStart option to prevent the server from starting once setup is complete, for example: $ ./setup --cli --acceptLicense --doNotStart --propertiesFilePath /tmp/properties --no-prompt An example properties file that works successfully on a low memory VM is: ldapPort=1389 generateSelfSignedCertificate=true enableStartTLS=true ldapsPort=3636 jmxPort=1689 adminConnectorPort=4444 rootUserDN=cn=Directory Manager rootUserPassword=password baseDN=dc=example,dc=com
  2. Run the import-ldif command offline to create the baseDN entry. You should use a command such as the following, which excludes the connection details and increases the JVM heap available to the command: $ export OPENDJ_JAVA_OPTS="-Xms512m -Xmx512m" && ./import-ldif --backendID userRoot --ldifFile /tmp/basedn.ldif

You should also look to increase the JVM heap size on your server. See How do I tune DS (All versions) process sizes: JVM heap and database cache? for further information. 

See Also

How do I tune DS (All versions) process sizes: JVM heap and database cache?

Best practice for JVM Tuning with CMS GC

Related Training


Related Issue Tracker IDs


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.