# Too many shards?

**URL:** <https://discuss.elastic.co/t/too-many-shards/297226>\
**Category:** Elasticsearch\
**Created:** [February 15, 2022, 10:11am UTC](https://discuss.elastic.co/t/too-many-shards/297226 "2022-02-15T10:11:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samir\_Sabri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samir_sabri/32/71095_2.png) [@Samir\_Sabri](https://discuss.elastic.co/u/Samir_Sabri)\
**Post date:** [February 15, 2022, 10:11am UTC](https://discuss.elastic.co/t/too-many-shards/297226/1 "2022-02-15T10:11:04Z")

</div>

Hello

We are having **unhealthy deployment** , I tried to check the shards state, it seems we have too many shards ?? [/\_cat/shards?h=index,shard,prirep,state,unassigned.reason](https://gist.github.com/hopewise/93b53a7f58b55c6aa5c26f47e50abb30)

The head size we have:

```auto
"jvm": {
        "mem": {
          "non_heap_used_in_bytes": 228968704,
          "heap_max_in_bytes": 30887378944,
          "heap_used_in_bytes": 4712939208,
          "heap_committed_in_bytes": 30887378944,
          "heap_used_percent": 15,
          "non_heap_committed_in_bytes": 247660544,
          "pools": {
            "old": {
              "max_in_bytes": 30023680000,
              "peak_max_in_bytes": 30023680000,
              "peak_used_in_bytes": 4063783088,
              "used_in_bytes": 4063783088
            },
            "young": {
              "max_in_bytes": 767754240,
              "peak_max_in_bytes": 767754240,
              "peak_used_in_bytes": 767754240,
              "used_in_bytes": 632512272
            },
            "survivor": {
              "max_in_bytes": 95944704,
              "peak_max_in_bytes": 95944704,
              "peak_used_in_bytes": 95944704,
              "used_in_bytes": 16643848
            }
          }
        },

```

And for [/\_cluster/allocation/explain?pretty](https://gist.github.com/hopewise/8c11e519430711a8d70c9039acc7f6ce)

Any support would be highly appreciated.

---

<div class="post-metadata">

**Author:** ![DineshNaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshnaik/32/89308_2.png) [@DineshNaik](https://discuss.elastic.co/u/DineshNaik)\
**Post date:** [February 15, 2022, 2:56pm UTC](https://discuss.elastic.co/t/too-many-shards/297226/2 "2022-02-15T14:56:52Z")

</div>

Can you share the output of those two api's?  
Also What is the cluster state ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 15, 2022, 8:58pm UTC](https://discuss.elastic.co/t/too-many-shards/297226/3 "2022-02-15T20:58:41Z")

</div>

The output from the `_cluster/stats?pretty&human` API would be better please.

---

<div class="post-metadata">

**Author:** ![Samir\_Sabri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samir_sabri/32/71095_2.png) [@Samir\_Sabri](https://discuss.elastic.co/u/Samir_Sabri)\
**Post date:** [February 16, 2022, 8:17am UTC](https://discuss.elastic.co/t/too-many-shards/297226/4 "2022-02-16T08:17:09Z")

</div>

Thanks for getting back to me on this.  
Just click on the api's I mentioned above, its linked to the output in a GitHub gist page.

I have got the stats after we have restarted the deployment, click [\_cluster/stats?pretty&human](https://gist.github.com/hopewise/ef73f89fd8660aa66034eb1714046b98) to view the output please.

---

<div class="post-metadata">

**Author:** ![DineshNaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshnaik/32/89308_2.png) [@DineshNaik](https://discuss.elastic.co/u/DineshNaik)\
**Post date:** [February 16, 2022, 8:33am UTC](https://discuss.elastic.co/t/too-many-shards/297226/5 "2022-02-16T08:33:29Z")

</div>

the current stats look good, also you just have 191 shards , so that's all right .  
Do you see any issues now?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 16, 2022, 10:00pm UTC](https://discuss.elastic.co/t/too-many-shards/297226/6 "2022-02-16T22:00:02Z")

</div>

6.8 reached [EOL](https://www.elastic.co/support/eol) this month, you should definitely consider upgrading given we've just released 8.0 🙂

That aside, your cluster is green, so it's not clear why you think this is unhealthy?

---

<div class="post-metadata">

**Author:** ![Samir\_Sabri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samir_sabri/32/71095_2.png) [@Samir\_Sabri](https://discuss.elastic.co/u/Samir_Sabri)\
**Post date:** [February 21, 2022, 3:13pm UTC](https://discuss.elastic.co/t/too-many-shards/297226/7 "2022-02-21T15:13:28Z")

</div>

After restating the deployment, it got green. Thanks for the note regarding 6.8.x reaching EOL, is there any recommended upgrade approach?

---

<div class="post-metadata">

**Author:** ![DineshNaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshnaik/32/89308_2.png) [@DineshNaik](https://discuss.elastic.co/u/DineshNaik)\
**Post date:** [February 21, 2022, 8:25pm UTC](https://discuss.elastic.co/t/too-many-shards/297226/8 "2022-02-21T20:25:15Z")

</div>

Please refer [Upgrade to Elastic 8.0.0 | Elastic Installation and Upgrade Guide [8.0] | Elastic](https://www.elastic.co/guide/en/elastic-stack/8.0/upgrading-elastic-stack.html) to know more about upgrade notes.

---

<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:** [March 21, 2022, 8:25pm UTC](https://discuss.elastic.co/t/too-many-shards/297226/9 "2022-03-21T20:25:17Z")

</div>

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