@@ -792,6 +792,45 @@ results by using <<get-async-eql-status-api,get async EQL status API>>.
792792You can also manually delete saved synchronous searches using the
793793<<delete-async-eql-search-api,delete async EQL search API>>.
794794
795+ [discrete]
796+ [[eql-circuit-breaker]]
797+ === EQL circuit breaker settings
798+
799+ When a <<eql-sequences, sequence>> query is executed, the node handling the query
800+ needs to keep some structures in memory, which are needed by the algorithm
801+ implementing the sequence matching. When large amounts of data need to be processed,
802+ and/or a large amount of matched sequences is requested by the user (by setting the
803+ <<eql-search-api-params-size, size>> query param), the memory occupied by those
804+ structures could potentially exceed the available memory of the JVM. This would cause
805+ an `OutOfMemory` exception which would bring down the node.
806+
807+ To prevent this from happening, a special <<circuit-breaker, circuit breaker>> is used,
808+ which limits the memory allocation during the execution of a <<eql-sequences, sequence>>
809+ query. When the breaker is triggered, an `org.elasticsearch.common.breaker.CircuitBreakingException`
810+ is thrown and a descriptive error message is returned to the user.
811+
812+ This <<circuit-breaker, circuit breaker>> can be configured using the following settings:
813+
814+ `breaker.eql_sequence.limit`::
815+ (<<cluster-update-settings,Dynamic>>) The limit for circuit breaker used to restrict
816+ the memory utilisation during the execution of an EQL sequence query. This value is
817+ defined as a percentage of the JVM heap. Defaults to `50%`. If the
818+ <<parent-circuit-breaker,parent circuit breaker>> is set to a value less than `50%`,
819+ this setting uses that value as its default instead.
820+
821+ `breaker.eql_sequence.overhead`::
822+ (<<cluster-update-settings,Dynamic>>) A constant that sequence query memory
823+ estimates are multiplied by to determine a final estimate. Defaults to `1`.
824+
825+ `breaker.eql_sequence.type`::
826+ (<<static-cluster-setting,Static>>) Circuit breaker type. Valid values are:
827+
828+ `memory` (Default):::
829+ The breaker limits memory usage for EQL sequence queries.
830+
831+ `noop`:::
832+ Disables the breaker.
833+
795834include::syntax.asciidoc[]
796835include::functions.asciidoc[]
797836include::pipes.asciidoc[]
0 commit comments