# Search.max\_buckets limit error on 7.0.1

**URL:** <https://discuss.elastic.co/t/search-max-buckets-limit-error-on-7-0-1/179989>\
**Category:** Elasticsearch\
**Created:** [May 7, 2019, 1:42pm UTC](https://discuss.elastic.co/t/search-max-buckets-limit-error-on-7-0-1/179989 "2019-05-07T13:42:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [May 7, 2019, 1:42pm UTC](https://discuss.elastic.co/t/search-max-buckets-limit-error-on-7-0-1/179989/1 "2019-05-07T13:42:24Z")

</div>

I have just upgraded to 7.0.1  
now I get this error.

how do I change this value?

"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10001]. This limit can be set by changing the [search.max\_buckets] cluster level setting.","max\_buckets":10000}},"status":503}

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [May 10, 2019, 3:48pm UTC](https://discuss.elastic.co/t/search-max-buckets-limit-error-on-7-0-1/179989/2 "2019-05-10T15:48:28Z")

</div>

`search.max_buckets` is a cluster-level setting, so you can change it with the [Update Cluster Settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html) API.

Do note that `search.max_buckets` is a safety soft-limit designed to prevent bad aggregations from hurting nodes. So be careful about making the limit too high. If you're tripping the limit often it might mean your aggregations need to be reconsidered or made smaller.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [May 10, 2019, 8:39pm UTC](https://discuss.elastic.co/t/search-max-buckets-limit-error-on-7-0-1/179989/3 "2019-05-10T20:39:34Z")

</div>

Thanks. found bad aggrigation, fixed it and error is gone

---

<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:** [June 7, 2019, 8:39pm UTC](https://discuss.elastic.co/t/search-max-buckets-limit-error-on-7-0-1/179989/4 "2019-06-07T20:39:39Z")

</div>

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