# How to add max buckets

**URL:** https://discuss.elastic.co/t/how-to-add-max-buckets/250304
**Category:** Kibana
**Created:** [September 29, 2020, 7:37am UTC](https://discuss.elastic.co/t/how-to-add-max-buckets/250304 "2020-09-29T07:37:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jamesyone](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jamesyone](https://discuss.elastic.co/u/jamesyone)
#### Post date: [September 29, 2020, 7:37am UTC](https://discuss.elastic.co/t/how-to-add-max-buckets/250304/1 "2020-09-29T07:37:37Z")

</div>

Hi- I keep getting this error-

Is it possible to add the max buckets on kibana? Or do I have to add it on elasticsearch??

Request to Elasticsearch failed: {"error":{"root\_cause":[{"type":"too\_many\_buckets\_exception","reason":"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},{"type":"too\_many\_buckets\_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10048]. This limit can be set by changing the [search.max\_buckets] cluster level setting.","max\_buckets":10000}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"securitylogs","node":"jVnX9ZTkRfqTbw4Gz2odGA","reason":{"type":"too\_many\_buckets\_exception","reason":"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}},{"shard":4,"index":"securitylogs","node":"jVnX9ZTkRfqTbw4Gz2odGA","reason":{"type":"too\_many\_buckets\_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [10000] but was [10048]. This limit can be set by changing the [search.max\_buckets] cluster level setting.","max\_buckets":10000}}]},"status":503}

---

<div class="post-metadata">

### Author: ![zjd-melo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zjd-melo/32/90749_2.png) [@zjd-melo](https://discuss.elastic.co/u/zjd-melo)
#### Post date: [September 29, 2020, 7:56am UTC](https://discuss.elastic.co/t/how-to-add-max-buckets/250304/2 "2020-09-29T07:56:06Z")

</div>

Yes, you can change the config on kibana console.

```auto
PUT _cluster/settings
{
  "persistent": {
    "search" : {
      "max_buckets" : "20000"
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![jamesyone](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jamesyone](https://discuss.elastic.co/u/jamesyone)
#### Post date: [September 29, 2020, 9:13am UTC](https://discuss.elastic.co/t/how-to-add-max-buckets/250304/3 "2020-09-29T09:13:23Z")

</div>

hi Melo-

Is that code able to paste under settings?

---

<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: [October 27, 2020, 9:22am UTC](https://discuss.elastic.co/t/how-to-add-max-buckets/250304/5 "2020-10-27T09:22:21Z")

</div>

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