You are currently reviewing an older revision of this page.

KB-1125 Heap space issues with search server

Symptoms

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]; } 

Cause

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).

Action

To correct this issue, perform the following:

  1. Review Search Server Sizing to determine how much JVM heap is required.
  2. Follow the steps mentioned in Starting and Stopping the Search Server to increase the search server heap limit.
  3. Stop the application server.
  4. Stop the search server.
  5. Recreate the indices before restarting the search server by deleting <APPIAN_HOME>/admin/search-localdirectory.
  6. Start the search server.
  7. Start the application server.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: February 2017