# Why search.max\_buckets soft limit is 10000 ? What are the cons of increasing this size limit?

**URL:** <https://discuss.elastic.co/t/why-search-max-buckets-soft-limit-is-10000-what-are-the-cons-of-increasing-this-size-limit/207190>\
**Category:** Elasticsearch\
**Created:** [November 8, 2019, 11:33pm UTC](https://discuss.elastic.co/t/why-search-max-buckets-soft-limit-is-10000-what-are-the-cons-of-increasing-this-size-limit/207190 "2019-11-08T23:33:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seetha93](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@Seetha93](https://discuss.elastic.co/u/Seetha93)\
**Post date:** [November 8, 2019, 11:33pm UTC](https://discuss.elastic.co/t/why-search-max-buckets-soft-limit-is-10000-what-are-the-cons-of-increasing-this-size-limit/207190/1 "2019-11-08T23:33:21Z")

</div>

Also, why top\_hits window inside aggregation buckets is 100. Does that mean, increasing the window size to 10 times will have a significant toll on performance ?

---

<div class="post-metadata">

**Author:** ![Quang\_D\_Tr\_n](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quang_d_tr_n/32/54722_2.png) [@Quang\_D\_Tr\_n](https://discuss.elastic.co/u/Quang_D_Tr_n)\
**Post date:** [November 9, 2019, 10:30am UTC](https://discuss.elastic.co/t/why-search-max-buckets-soft-limit-is-10000-what-are-the-cons-of-increasing-this-size-limit/207190/2 "2019-11-09T10:30:45Z")

</div>

Not sure but if the size is greater than 100, it might possibly cause error as in [this thread](https://discuss.elastic.co/t/top-hits-aggregation-maximum-size/131350)

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [November 12, 2019, 11:51am UTC](https://discuss.elastic.co/t/why-search-max-buckets-soft-limit-is-10000-what-are-the-cons-of-increasing-this-size-limit/207190/3 "2019-11-12T11:51:02Z")

</div>

These limits are typically memory-related. Trying to carry too much back in a single response is a way to put servers under memory pressure - especially if your system is dealing with multiple concurrent users.  
For large result sets you'll want to break single requests into multiple using something like the [composite](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-composite-aggregation.html) aggregation and the `after` parameter to page through results.

---

<div class="post-metadata">

**Author:** ![Seetha93](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@Seetha93](https://discuss.elastic.co/u/Seetha93)\
**Post date:** [November 14, 2019, 9:56pm UTC](https://discuss.elastic.co/t/why-search-max-buckets-soft-limit-is-10000-what-are-the-cons-of-increasing-this-size-limit/207190/4 "2019-11-14T21:56:10Z")

</div>

Thank you

---

<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 12, 2019, 9:56pm UTC](https://discuss.elastic.co/t/why-search-max-buckets-soft-limit-is-10000-what-are-the-cons-of-increasing-this-size-limit/207190/5 "2019-12-12T21:56:14Z")

</div>

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