# Shard count too high

**URL:** <https://discuss.elastic.co/t/shard-count-too-high/75363>\
**Category:** Elasticsearch\
**Created:** [February 16, 2017, 3:50pm UTC](https://discuss.elastic.co/t/shard-count-too-high/75363 "2017-02-16T15:50:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lhorsky1](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@lhorsky1](https://discuss.elastic.co/u/lhorsky1)\
**Post date:** [February 16, 2017, 3:50pm UTC](https://discuss.elastic.co/t/shard-count-too-high/75363/1 "2017-02-16T15:50:48Z")

</div>

I am doing an upgrade from 2.4 to 5.x. When I ran the elasticsearch-migration plugin, it gives me this message in the Cluster check results:  
"Indices: Total primary shards:

- In 5.x, a maximum of 1000 shards can be queried in a single request. This cluster has 2476 primary shards"

But when I do 'XGET \_cat/shards', I only get 602 shards in the output. I am using curator to close indices greater than 60 days. Is that where the extra shards are coming from? Do I need to worry about this error, since we don't do queries that include closed indices in Curator?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [February 17, 2017, 1:53pm UTC](https://discuss.elastic.co/t/shard-count-too-high/75363/2 "2017-02-17T13:53:09Z")

</div>

Hi @lhorsky1,

I checked the source code of the migration plugin. It reads all indices returned by `/_cluster/state/metadata` (including closed ones) and sums up the number of shards it finds there. So you're right: The large discrepancy is coming from closed indices and I'd say you can safely ignore this warning.

Daniel

---

<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 17, 2017, 1:53pm UTC](https://discuss.elastic.co/t/shard-count-too-high/75363/3 "2017-03-17T13:53:57Z")

</div>

Closed on March 17, 2017, 1:53pm UTC

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