# Circuit\_breaking\_exception

**URL:** <https://discuss.elastic.co/t/circuit-breaking-exception/261503>\
**Category:** Elasticsearch\
**Created:** [January 19, 2021, 7:51am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503 "2021-01-19T07:51:02Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [January 19, 2021, 7:51am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/1 "2021-01-19T07:51:02Z")

</div>

@Marta_Bondyra  
Hello, I need some help

```auto
    {
      "error": {
        "root_cause": [
          {
            "type": "circuit_breaking_exception",
            "reason": "[parent] Data too large, data for [<transport_request>] would be [1024631734/977.1mb], which is larger than the limit of [1003493785/957mb], real usage: [1024631512/977.1mb], new bytes reserved: [222/222b], usages [request=16440/16kb, fielddata=0/0b, in_flight_requests=495194/483.5kb, accounting=154193560/147mb]",
            "bytes_wanted": 1024631734,
            "bytes_limit": 1003493785,
            "durability": "PERMANENT"
          }
        ],
        "type": "circuit_breaking_exception",
        "reason": "[parent] Data too large, data for [<transport_request>] would be [1024631734/977.1mb], which is larger than the limit of [1003493785/957mb], real usage: [1024631512/977.1mb], new bytes reserved: [222/222b], usages [request=16440/16kb, fielddata=0/0b, in_flight_requests=495194/483.5kb, accounting=154193560/147mb]",
        "bytes_wanted": 1024631734,
        "bytes_limit": 1003493785,
        "durability": "PERMANENT"
      },
      "status": 429
    }

```

What is wrong and how to correct it?

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [January 20, 2021, 9:02pm UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/2 "2021-01-20T21:02:19Z")

</div>

The [parent circuit breaker](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/circuit-breaker.html#parent-circuit-breaker) trip in this log entry and in this case it means the existing JVM Heap usage level is already too high to be able to run a task which gets rejected to avoid Out-Of-Memory

Most likely given elasticsearch JVM Heap Space was only 1Gb in this case, you should increase [JVM Heap Space](https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#heap-size-settings) further to a level where the is no longer memory pressure issues (up to maximum of 50% of RAM or 30Gb whichever is lowest)...

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [January 21, 2021, 7:46am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/3 "2021-01-21T07:46:39Z")

</div>

Hello @Julien,  
I have 3-node cluster, each machine has 20GB RAM and JVM is set to 14GB, so I think it should be enough, but it is not.  
So I think if I want to keep more data should I add another node?

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [January 21, 2021, 4:42pm UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/4 "2021-01-21T16:42:17Z")

</div>

> [@zen.xen](#):
>
> each machine has 20GB RAM and JVM is set to 14GB, so I think it should be enough, but it is not.

First point with 20Gb RAM, maximum JVM Heap (Xms and Xmx) you should use is 10Gb (50% of RAM), and you probably want to use the smallest amount so if you have issue with 1Gb you can potentially try 2 or 4Gb to keep as much RAM as possible for the file system cache.

Per the error the parent circuit breaker is set to 957Mb, so if you have not customised it, this uses 95% of JVM Heap (or 70% for older versions or when you disable use\_real\_memory) and I assume the JVM Heap Space is currently configured at 1Gb.  
You can verify this with `ps -ef | grep java` to verify which jvm.options are used on the current elasticsearch JVM process, or check with `GET _nodes` in Kibana Dev Tools console and look for `-Xmx` and `-Xms`

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [January 21, 2021, 9:56pm UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/5 "2021-01-21T21:56:57Z")

</div>

Hi @Julien,  
I have only changed parameters in jvm.options, `-Xms` and `-Xmx` are set to `14g`.  
`GET _nodes` shown that there are other`-Xms1g` and `-Xmx1g` but I don't know where they are. Maybe these values also should be changed?

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [January 26, 2021, 11:41am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/6 "2021-01-26T11:41:52Z")

</div>

I think if you changed in jvm.options and restarted elasticsearch node, you should be good, you can check using `GET _nodes/stats/jvm` the value for `jvm.mem.heap_max_in_bytes`

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [January 26, 2021, 12:10pm UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/7 "2021-01-26T12:10:36Z")

</div>

I have checked jvm.mem and it is

> "heap\_max\_in\_bytes" : 1056309248

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [January 29, 2021, 8:29am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/8 "2021-01-29T08:29:33Z")

</div>

Hello @Julien,  
I used `GET _nodes`, the result is

```auto
"using_compressed_ordinary_object_pointers" : "true",
"input_arguments" : [
...
...
...
  "-Dio.netty.noUnsafe=true",
  "-Djava.locale.providers=COMPAT",
  "-Xms16g",
  "-Xmx16g",
  "-XX:+UseConcMarkSweepGC",
  "-XX:CMSInitiatingOccupancyFraction=75",
...
...
...
  "-XX:NumberOfGCLogFiles=32",
  "-XX:GCLogFileSize=64m",
  "-Xms1g",
  "-Xmx1g", 

```

I have changed only these in `jvm.options`

> "-Xms16g",  
> "-Xmx16g",

there are another

> "-Xms1g",  
> "-Xmx1g",

where I find them? Maybe these options are wrong and they cause errors

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [January 29, 2021, 10:11am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/9 "2021-01-29T10:11:31Z")

</div>

@Julien,  
I found sth like this

```auto
GET /_cat/nodes?h=heap*&v

heap.current heap.percent heap.max
     902.1mb 89 1007.3mb
       828mb 82 1007.3mb
     916.4mb 90 1007.3mb

```

maybe this will be helpfull

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [February 1, 2021, 8:56am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/10 "2021-02-01T08:56:26Z")

</div>

@Julien  
Hello,  
I've discovered something, even I change these parameters in java.options to `"-Xms16g", "-Xmx16g"`, they don't work, elasticsearch is installed on Windows 2012.  
I've checked the same on Linux and there is no problem.  
How can I fix this problem?

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [February 1, 2021, 9:37pm UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/11 "2021-02-01T21:37:44Z")

</div>

There are multiple ways to install and run elasticsearch on Windows and I not sure which version of the installer you use. Assuming this is 7.10 and you used the MSI installer, you should have used [SELECTEDMEMORY](https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html) as the msiexec parameter.  
Or check from the doc about [zip install on windows](https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-windows.html) :

```auto
To adjust the heap size for an already installed service, use the service manager: bin\elasticsearch-service.bat manager.

```

---

<div class="post-metadata">

**Author:** ![zen.xen](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zen.xen](https://discuss.elastic.co/u/zen.xen)\
**Post date:** [February 2, 2021, 7:18am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/12 "2021-02-02T07:18:33Z")

</div>

@Julien,  
my version is **bitnami-elk-7.5.2-0-windows-x64-installer.exe**

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [February 3, 2021, 10:37am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/13 "2021-02-03T10:37:24Z")

</div>

> [@zen.xen](#):
>
> bitnami-elk-7.5.2-0-windows-x64-installer.exe

This is not a package created by Elastic so I have no knowledge of this package, so I would suggest to direct the question on how to size Elasticsearch JVM Heap to Bitnami (or check on their documentation/forums if it's already documented), or use one of the installer provided by Elastic that I referred to above

---

<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:** [March 3, 2021, 10:38am UTC](https://discuss.elastic.co/t/circuit-breaking-exception/261503/14 "2021-03-03T10:38:18Z")

</div>

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