KB-1446 How to enable automatic heap dumps on OutOfMemoryError for Appian Search Server


The Appian Search Server may crash due to an OutOfMemoryError. An OutOfMemoryError indicates that the search server has run out of available heap space. The root cause for running out of heap space may vary.

Default heap space for the Search Server is 1GB. For production servers with large search indices, this may need to be increased, but prior to increasing heap space it is necessary to investigate why the issue is occurring in order to ensure system stability.


In order to investigate the root cause of the OutOfMemoryError, a heap dump must be gathered from the time the heap usage was high. The heap dump contains a snapshot of the objects stored in memory by the Search Server and will assist Appian Technical Support in determining the root cause behind the issue.

In order to configure the Search Server to attempt to capture a heap dump when an OutOfMemoryError is triggered, amend the start.bat|sh script located in <APPIAN_HOME>/search-server/bin to include the flag to automatically capture a heap dump:

  1. Add the -XX:+HeapDumpOnOutOfMemoryError argument to the search-server JVM arguments so it can create a heap dump if it runs out of heap space.
    1. Open the start.bat|sh script with a text editor.
    2. Locate the following line:
      SS_MEM_ARGS="-Xms1024m -Xmx1024m"
    3. Alter it such that the line reads:
      SS_MEM_ARGS="-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"
    4. Save the file.
  2. Restart the search server and review <APPIAN_HOME>/logs/search-server/search-server.log. Ensure that the startup output contains the following lines:
    [INFO ][com.appian.es.bootstrap.NodeInit] JVM Arguments:
  3. If an OutOfMemoryError is detected, the Search Server will attempt to capture a heap dump under <APPIAN_HOME>/search-server/bin.

For information on how to analyze a heap dump, refer to KB-1176.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: January 2018