# Composite Aggregation - Too many buckets

**URL:** <https://discuss.elastic.co/t/composite-aggregation-too-many-buckets/270962>\
**Category:** Elasticsearch\
**Created:** [April 22, 2021, 1:20pm UTC](https://discuss.elastic.co/t/composite-aggregation-too-many-buckets/270962 "2021-04-22T13:20:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vands](https://avatars.discourse-cdn.com/v4/letter/v/cc9497/32.png) [@vands](https://discuss.elastic.co/u/vands)\
**Post date:** [April 22, 2021, 1:20pm UTC](https://discuss.elastic.co/t/composite-aggregation-too-many-buckets/270962/1 "2021-04-22T13:20:27Z")

</div>

Hi All ,

Facing the below issue while using composite aggregation and get buckets data  
[Elasticsearch exception [type=too\_many\_buckets\_exception, reason=Trying to create too many buckets. Must be less than or equal to: [65535] but was [67376].

Any pointers on this will be helpful .

Thanks In Advance,  
Vands

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [April 22, 2021, 1:26pm UTC](https://discuss.elastic.co/t/composite-aggregation-too-many-buckets/270962/2 "2021-04-22T13:26:58Z")

</div>

You can [increase the limit](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-settings.html#search-settings-max-buckets) or remove a bucket and that would get you there.

---

<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:** [May 20, 2021, 1:27pm UTC](https://discuss.elastic.co/t/composite-aggregation-too-many-buckets/270962/3 "2021-05-20T13:27:06Z")

</div>

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