Route/bundles in ESB Runtime fail with 'java.lang.OutOfMemoryError: Java heap space error'

Problem Description

An ESB Runtime handling large amounts of data, with the JAVA_MAX_MEM set properly in the setenv and setmem scripts, throws the following error:

java.lang.OutOfMemoryError: Java heap space error


Root Cause

The following are possible causes of this error:


  • ESB Runtime started as a service. This means the Java memory parameters set in the setenv and setmem scripts are ignored, because these files are not taken into account by the wrapper service.

  • Running as a service, Java memory options are set in the wrapper configuration file.

  • The default values in the wrapper configuration file might not be big enough for your use case.



Set the Java memory options in the wrapper configuration file as follows:

  1. Navigate to your <RUNTIME-HOME>/etc/ folder and locate the file that ends with wrapper.conf.

  2. Edit the wrapper.conf file, and find the following lines:

    # Initial Java Heap Size (in MB)
    # Maximum Java Heap Size (in MB)
  3. To set the minimum memory, remove the # at the beginning of, and increase the value.


    Note: if you set these Java memory options to a value larger than 4096m, then the wrapper service defaults to 4096m. If you need to set them to a larger value, add the following two lines in the wrapper.conf file, under # JVM Parameters:

    where n is the number of the additional parameters; typically look for the last entry and use n+1.


    Comment the and lines:
  4. Save the file.

  5. Restart Runtime for changes to take effect.

Version history
Revision #:
7 of 7
Last update:
‎08-20-2019 12:21 PM
Updated by: