# Size\_limit\_exceeded\_exception

**URL:** <https://discuss.elastic.co/t/size-limit-exceeded-exception/372374>\
**Category:** Elasticsearch\
**Created:** [December 24, 2024, 8:58pm UTC](https://discuss.elastic.co/t/size-limit-exceeded-exception/372374 "2024-12-24T20:58:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![praveen4bv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen4bv/32/45595_2.png) [@praveen4bv](https://discuss.elastic.co/u/praveen4bv)\
**Post date:** [December 24, 2024, 8:58pm UTC](https://discuss.elastic.co/t/size-limit-exceeded-exception/372374/1 "2024-12-24T20:58:54Z")

</div>

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 only when a larger text is passed to the search template. Is there any configuration that can be applied to mitigate this error?

---

<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:** [December 26, 2024, 3:36pm UTC](https://discuss.elastic.co/t/size-limit-exceeded-exception/372374/2 "2024-12-26T15:36:55Z")

</div>

See here

> [@Unable to set mustache.max\_output\_size\_bytes in elasticsearch.yml version 7.17.25](https://discuss.elastic.co/t/unable-to-set-mustache-max-output-size-bytes-in-elasticsearch-yml-version-7-17-25/372412/2):
>
> Try looks like the setting needs units mustache.max\_output\_size\_bytes: 1mb So 2mb would be mustache.max\_output\_size\_bytes: 2mb See
