# How to Resolve In\_flight\_request Data too Large Errors

**URL:** <https://discuss.elastic.co/t/how-to-resolve-in-flight-request-data-too-large-errors/289193>\
**Category:** Elasticsearch\
**Created:** [November 15, 2021, 11:59am UTC](https://discuss.elastic.co/t/how-to-resolve-in-flight-request-data-too-large-errors/289193 "2021-11-15T11:59:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mertkaant](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mertkaant](https://discuss.elastic.co/u/mertkaant)\
**Post date:** [November 15, 2021, 11:59am UTC](https://discuss.elastic.co/t/how-to-resolve-in-flight-request-data-too-large-errors/289193/1 "2021-11-15T11:59:29Z")

</div>

**Hello, dear community,**

We are constantly getting this OutOfMemory error with our master-1 machine.

```auto
[in_flight_requests] New used memory 4567112664 [4.2gb] for data of [<http_request>] would be larger than configured breaker: 4294967296 [4gb]

```

We tried to increase heap size to 5 GB etc. but it constantly occurred.

I used this API to get more details about my Circuit Breakers

> GET \_nodes/stats/breaker

The output(Summary):

```auto
{
    "_nodes": {
        "total": 9,
        "successful": 9,
        "failed": 0
    },
    "name": "master-3",
    "breakers": {
        "in_flight_requests": {
            "limit_size_in_bytes": 4294967296,
            "limit_size": "4gb",
            "estimated_size_in_bytes": 2754,
            "estimated_size": "2.6kb",
            "overhead": 2.0,
            "tripped": 0
        }
    },
    "name": "master-2",
    "breakers": {
        "in_flight_requests": {
            "limit_size_in_bytes": 4294967296,
            "limit_size": "4gb",
            "estimated_size_in_bytes": 2754,
            "estimated_size": "2.6kb",
            "overhead": 2.0,
            "tripped": 0
        }
    },
    "name": "master-1",
    "breakers": {
        "in_flight_requests": {
            "limit_size_in_bytes": 4294967296,
            "limit_size": "4gb",
            "estimated_size_in_bytes": 135597,
            "estimated_size": "132.4kb",
            "overhead": 2.0,
            "tripped": 872
        }
    }
}

```

As you see we have 3 master nodes. Master 2 and Master 3 have tripped 0 times but Master 1 has tripped 872 times.

I found this ` network.breaker.inflight_requests.limit` setting in the [Circuit Breakers document](https://www.elastic.co/guide/en/elasticsearch/reference/master/circuit-breaker.html#in-flight-circuit-breaker). It says it is %100 by default. I didn't see that setting in my elasticsearch.yml file or anywhere else. Maybe we are not using it?

**Here are my questions to you guys:**

Our In flight request circuit breaker has tripped 872 on master-1 but it didn't trip on master-2 and master-3. Looks like we have a problem somewhere but I don't know where to look.

1. What should I do about this situation? If we use load balancers for masters is it works?
2. That `network.breaker.inflight_requests.limit` setting, can this setting fixes my OOM problems with In flight requests? If so, how can I implement this in my cluster?
3. How should I approach these problems in general?

Thanks for reading and replying already!

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [November 15, 2021, 5:51pm UTC](https://discuss.elastic.co/t/how-to-resolve-in-flight-request-data-too-large-errors/289193/2 "2021-11-15T17:51:40Z")

</div>

If you have dedicated master nodes in the cluster, why are you sending requests to them? Dedicated master nodes should not serve traffic and be left to manage the cluster. Send the data directly to the data nodes instead.

---

<div class="post-metadata">

**Author:** ![mertkaant](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mertkaant](https://discuss.elastic.co/u/mertkaant)\
**Post date:** [November 16, 2021, 6:33am UTC](https://discuss.elastic.co/t/how-to-resolve-in-flight-request-data-too-large-errors/289193/3 "2021-11-16T06:33:54Z")

</div>

Thanks for your answer, Christian! Will do that

---

<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:** [December 14, 2021, 6:33am UTC](https://discuss.elastic.co/t/how-to-resolve-in-flight-request-data-too-large-errors/289193/4 "2021-12-14T06:33:54Z")

</div>

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