KB-1446 How to enable automatic heap dumps on OutOfMemoryError for Appian Search Server
Purpose
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.
Instructions
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:
- Add the
-XX:+HeapDumpOnOutOfMemoryErrorargument to the search-server JVM arguments so it can create a heap dump if it runs out of heap space.- Open the
start.bat|shscript with a text editor. - Locate the following line:
SS_MEM_ARGS="-Xms1024m -Xmx1024m" - Alter it such that the line reads:
SS_MEM_ARGS="-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError" - Save the file.
- Open the
- 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:
-Xms1024m
-Xmx1024m
-XX:+HeapDumpOnOutOfMemoryError - If an
OutOfMemoryErroris 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
