# Mustache script result size limit exceeded

**URL:** <https://discuss.elastic.co/t/mustache-script-result-size-limit-exceeded/375818>\
**Category:** Elasticsearch\
**Created:** [March 13, 2025, 10:10am UTC](https://discuss.elastic.co/t/mustache-script-result-size-limit-exceeded/375818 "2025-03-13T10:10:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Kumar8](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arun_kumar8/32/132827_2.png) [@Arun\_Kumar8](https://discuss.elastic.co/u/Arun_Kumar8)\
**Post date:** [March 13, 2025, 10:10am UTC](https://discuss.elastic.co/t/mustache-script-result-size-limit-exceeded/375818/1 "2025-03-13T10:10:24Z")

</div>

Hi Team,

After upgrading the elastic version 7.17.11 to 7.17.27 we are getting the below error while searching in Elasticsearch.  
our request body size is less than 1 MB, even though we are getting the same exception.  
can you please help to resolve this issue.  
It was working fine in the version 7.17.11

```auto
{
    "error": {
        "root_cause": [
            {
                "type": "parse_exception",
                "reason": "Mustache script result size limit exceeded"
            }
        ],
        "type": "parse_exception",
        "reason": "Mustache script result size limit exceeded",
        "caused_by": {
            "type": "size_limit_exceeded_exception",
            "reason": "String [{ \"_source\" : [\"id\",...] has exceeded the size limit [1073741824]"
        }
    },
    "status": 400
}

```

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [March 13, 2025, 3:26pm UTC](https://discuss.elastic.co/t/mustache-script-result-size-limit-exceeded/375818/2 "2025-03-13T15:26:55Z")

</div>

> [@Arun\_Kumar8](#):
>
> `Mustache script result size limit exceeded`

> [@Size\_limit\_exceeded\_exception](https://discuss.elastic.co/t/size-limit-exceeded-exception/372374):
>
> Hi, We have recently upgraded from Elasticsearch 7.17.11 to 7.17.25. Post the upgrade, we started seeing the below exception while querying through Search (Mustache) templates. ElasticsearchStatusException[Elasticsearch exception [type=parse\_exception, reason=Mustache script result size limit exceeded]]; nested: ElasticsearchException[Elasticsearch exception [type=size\_limit\_exceeded\_exception, reason=String [{ "\_source":["] has exceeded the size limit [1048576]]] This error is occuring onl…

?
