# Request circuit breaker

**URL:** <https://discuss.elastic.co/t/request-circuit-breaker/355956>\
**Category:** Elasticsearch\
**Created:** [March 22, 2024, 5:22am UTC](https://discuss.elastic.co/t/request-circuit-breaker/355956 "2024-03-22T05:22:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bugb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bugb/32/90933_2.png) [@bugb](https://discuss.elastic.co/u/bugb)\
**Post date:** [March 22, 2024, 5:22am UTC](https://discuss.elastic.co/t/request-circuit-breaker/355956/1 "2024-03-22T05:22:49Z")

</div>

We are running several Elasticsearch version 7.x clusters with a total of more than 100 data nodes. Each data node has 32 GB of memory and 8 vCPUs.

I have some questions about the request circuit breaker: [Link to documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/circuit-breaker.html#request-circuit-breaker)

- What is the best practice for setting the limit? By default, it is set to 60%. Can we increase it to a higher number? The reason is that we are encountering a lot of "New used memory for data of preallocate[aggregations] would be larger than the configured breaker" errors.

- Quoting from the docs:

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

Can you please explain this? Is the limit for a single request (meaning Elasticsearch will calculate and check if a single request exceeds this limit), or is it for concurrent requests (meaning the total limit for concurrent requests at a time)?

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [March 22, 2024, 10:52am UTC](https://discuss.elastic.co/t/request-circuit-breaker/355956/2 "2024-03-22T10:52:58Z")

</div>

Hi @bugb,

Welcome back! You can tweak the circuit breaker settings and increase the threshold. Generally the defaults are pretty sensible, and increasing the limits means you're running a higher risk of the node crashing with an out of memory error. I would recommend looking at the requests your are sending to figure out why you are triggering the circuit breaker.

> [@bugb](#):
>
> 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.

My understanding of reading that excerpt is that the limit is for a single request, taking into account the overhead multiplier. I'm sure someone will chime in if this is not correct. There is a bit of detail in [this post](https://opster.com/guides/elasticsearch/operations/elasticsearch-circuit-breakers/) that might also help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 19, 2024, 10:53am UTC](https://discuss.elastic.co/t/request-circuit-breaker/355956/3 "2024-04-19T10:53:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
