KB-1125 Heap space issues with search server


When utilizing functionality that requires the search server, the following error message is printed in the application server log:

Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[90nFgyfMQPmYsbhzr2aI7w][xray-rule-execution][0]: ElasticsearchException[org.elasticsearch.ElasticsearchException: java.lang.OutOfMemoryError: Java heap space]; nested: UncheckedExecutionException[org.elasticsearch.ElasticsearchException: java.lang.OutOfMemoryError: Java heap space]; nested: ElasticsearchException[java.lang.OutOfMemoryError: Java heap space]; nested: ExecutionError[java.lang.OutOfMemoryError: Java heap space]; nested: OutOfMemoryError[Java heap space]; } 


The error is seen when one of the search server functionalities requires more JVM heap than the configured maximum limit. By default, the search server will start with the configurations for initial and maximum memory usage (JVM heap) each set to 1024MB (1GB).


Starting with Appian 17.2, rule performance metrics are aggregated every minute to help save on disk space and heap memory. Please upgrade to this version of Appian to help mitigate the heap issues in your environment.


If upgrading to Appian 17.2 is not feasible, perform the following to manually increase the heap on the search server machine (Note: The machine must be equipped to handle additional memory on the search server machine. Do not attempt these steps on a box that consistently runs high on memory):

  1. Follow the steps mentioned in Starting and Stopping the Search Server to increase the search server heap limit.
  2. Stop the application server.
  3. Stop the search server.
  4. Recreate the indices before restarting the search server by following the action in KB-1082.
  5. Start the search server.
  6. Start the application server.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: January 2021