KB-1025 "java.lang.OutOfMemoryError: Java heap Space" error thrown during application server startup

Symptoms

Regardless of the application server used, when trying to deploy an application, the following error message is displayed:

java.lang.OutOfMemoryError: Java heap Space

The application then fails to deploy.

Cause

The default initial and/or maximum heap sizes configured are too small.

Action

The required action varies based on the application server:

JBoss

The settings described below should be made to the following file:

<JBOSS_HOME>\bin\standalone.custom.(bat|sh)

If this file does not already exist, rename standalone.custom.(bat|sh).example to standalone.custom.(bat|sh) before proceeding.

Once you've identified the appropriate memory settings, you can override the default memory settings by setting the USER_MEM_ARGS variable as desired. Configure the variable as follows, changing the memory values to your desired minimum and maximum memory settings:

USER_MEM_ARGS="-Xms2048m -Xmx4096m"

The heap dump setting is already configured in the standalone.conf file provided in the configure script. You do not need to set the property again unless you want to change the default memory settings, which match the examples given here.

Tomcat

Once you've identified the appropriate memory settings, you can override the default memory settings in setenv.sh|bat file (located in the <APPIAN_HOME>/tomcat/apache-tomcat/bin directory). Configure the heap related variables as follows:

set configuredMinHeap=2048m
set configuredMaxHeap=4096m

WebLogic

Once you've identified the appropriate memory settings, set the JVM arguments for server start by completing the following in the WebLogic Administrative Console:

  1. Navigate to Environment > Servers.
  2. Click the AdminServer link.
  3. On the Configuration tab, select the Server Start tab.
  4. In the Arguments input box, enter the following, changing the below values to desired ones:

    -Xms2048m -Xmx4096m

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: October 2018

Related
Recommended