# Elastic Search Heap size

**URL:** <https://discuss.elastic.co/t/elastic-search-heap-size/327266>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 8, 2023, 11:47am UTC](https://discuss.elastic.co/t/elastic-search-heap-size/327266 "2023-03-08T11:47:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jozelle\_Cinco](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jozelle_cinco/32/118191_2.png) [@Jozelle\_Cinco](https://discuss.elastic.co/u/Jozelle_Cinco)\
**Post date:** [March 8, 2023, 11:47am UTC](https://discuss.elastic.co/t/elastic-search-heap-size/327266/1 "2023-03-08T11:47:31Z")

</div>

Hi!

We have a Headless Drupal 9 site (FE: Gatsby) with Elasticsearch that's currently encountering `[circuit_breaking_exception]` when doing a search. As per some discussions it is suggested we adjust the Heap size on Production but not sure on where should we adjust it. We were able to adjust it on the `docker-compose.elasticsearch.yml` by defining `"ES_JAVA_OPTS=-Xms1g -Xmx1g"` on file, but this is only for ddev/local instances. Can you provide us some inputs on how we can adjust this on the Production site or some recommended performance adjustments?

Error on site:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "circuit_breaking_exception",
        "reason": "[parent] Data too large, data for [<http_request>] would be [412221276/393.1mb], which is larger than the limit of [408420352/389.5mb], real usage: [412218440/393.1mb], new bytes reserved: [2836/2.7kb], usages [request=192/192b, fielddata=4449/4.3kb, in_flight_requests=2836/2.7kb, model_inference=0/0b, accounting=273048/266.6kb]",
        "bytes_wanted": 412221276,
        "bytes_limit": 408420352,
        "durability": "PERMANENT"
      }
    ],
    "type": "circuit_breaking_exception",
    "reason": "[parent] Data too large, data for [<http_request>] would be [412221276/393.1mb], which is larger than the limit of [408420352/389.5mb], real usage: [412218440/393.1mb], new bytes reserved: [2836/2.7kb], usages [request=192/192b, fielddata=4449/4.3kb, in_flight_requests=2836/2.7kb, model_inference=0/0b, accounting=273048/266.6kb]",
    "bytes_wanted": 412221276,
    "bytes_limit": 408420352,
    "durability": "PERMANENT"
  },
  "status": 429
}

```

Here's the current data on the Stack Monitoring page:

 ![Screen Shot 2023-03-08 at 9.49.46 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/5/15879af228239264313fdfb8badf87dda54bce3b.jpeg)

Really appreciate any input here, Thank you!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 8, 2023, 2:38pm UTC](https://discuss.elastic.co/t/elastic-search-heap-size/327266/2 "2023-03-08T14:38:51Z")

</div>

Hi @Jozelle_Cinco Welcome to the community!

What version are you running? Oh 7.8.0.... very very old and EOL. You should upgrade with Matt of urgency.

What is your installation method for production... Is it docker as well or a package?

See here

> **[Setting JVM options | Elasticsearch Guide \[7.8\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/jvm-options.html)**

---

<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 5, 2023, 2:38pm UTC](https://discuss.elastic.co/t/elastic-search-heap-size/327266/3 "2023-04-05T14:38:54Z")

</div>

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