WARNING: Version 5.1 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Elasticsearch contains multiple circuit breakers used to prevent operations from causing an OutOfMemoryError. Each breaker specifies a limit for how much memory it can use. Additionally, there is a parent-level breaker that specifies the total amount of memory that can be used across all breakers.
These settings can be dynamically updated on a live cluster with the cluster-update-settings API.
Parent circuit breakeredit
The parent-level breaker can be configured with the following setting:
- Starting limit for overall parent breaker, defaults to 70% of JVM heap.
Field data circuit breakeredit
The field data circuit breaker allows Elasticsearch to estimate the amount of memory a field will require to be loaded into memory. It can then prevent the field data loading by raising an exception. By default the limit is configured to 60% of the maximum JVM heap. It can be configured with the following parameters:
- Limit for fielddata breaker, defaults to 60% of JVM heap
- A constant that all field data estimations are multiplied with to determine a final estimation. Defaults to 1.03
Request circuit breakeredit
The request circuit breaker allows Elasticsearch to prevent per-request data structures (for example, memory used for calculating aggregations during a request) from exceeding a certain amount of memory.
- Limit for request breaker, defaults to 60% of JVM heap
- A constant that all request estimations are multiplied with to determine a final estimation. Defaults to 1
In flight requests circuit breakeredit
The in flight requests circuit breaker allows Elasticsearch to limit the memory usage of all currently active incoming requests on transport or HTTP level from exceeding a certain amount of memory on a node. The memory usage is based on the content length of the request itself.
- Limit for in flight requests breaker, defaults to 100% of JVM heap. This means that it is bound by the limit configured for the parent circuit breaker.
- A constant that all in flight requests estimations are multiplied with to determine a final estimation. Defaults to 1
Script compilation circuit breakeredit
Slightly different than the previous memory-based circuit breaker, the script compilation circuit breaker limits the number of inline script compilations within a period of time.
See the "prefer-parameters" section of the scripting documentation for more information.
- Limit for the number of unique dynamic scripts within a minute that are allowed to be compiled. Defaults to 15.