# I can't edit my deployment because I have too many shards in my cluster

**URL:** <https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774>\
**Category:** Elasticsearch\
**Created:** [January 12, 2021, 12:17am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774 "2021-01-12T00:17:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel\_at\_gus](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@daniel\_at\_gus](https://discuss.elastic.co/u/daniel_at_gus)\
**Post date:** [January 12, 2021, 12:17am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/1 "2021-01-12T00:17:23Z")

</div>

Hi, community.

Recently I have talked to Elastic Cloud support team and they told me that my cluster fails to edit my deployment because I have too many shards in my cluster. They suggested me to delete unused indexes. So I'm doing that right now and I have found many indexes named .reporting-YYYY.MM.DD. When I tried to delete them using the Kibana UI, it told me that those are System Indexes and by deleting them, it could break Kibana. Is it safe to delete them? I think they don't have relevant information.

Thanks.

---

<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:** [January 12, 2021, 12:43am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/2 "2021-01-12T00:43:33Z")

</div>

It's ok to delete older ones of those, yes 🙂

---

<div class="post-metadata">

**Author:** ![daniel\_at\_gus](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@daniel\_at\_gus](https://discuss.elastic.co/u/daniel_at_gus)\
**Post date:** [January 16, 2021, 1:01am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/3 "2021-01-16T01:01:27Z")

</div>

Thanks, @warkolm. I have deleted those indexes. However, I can't edit my deployment yet. Every time I try to edit the cluster, it fails with the following error

"Finished a few seconds ago and took a minute, but ultimately failed"

When I clicked in Details the only thing I see what is what is in the attached image. I can't see any other log. If I request a GET to /\_cat/shards, I started with 1400 shards. Now I have 606 shards. I have deleted everything I can. I'm not sure how many more I have to remove before I can change anything in my deployment.

Do you guys know what else I can do to return to healthy my cluster and perform some changes?

Thanks.

 ![Captura de Pantalla 2021-01-15 a la(s) 18.53.45](https://us1.discourse-cdn.com/elastic/original/3X/0/2/027a8c48c1549e7f9ef95f7381ccbffbdf070de1.png)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 16, 2021, 2:22am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/4 "2021-01-16T02:22:08Z")

</div>

Welcome @daniel_at_gus to the community, sorry you have to join with such a tough issue.

> [@daniel\_at\_gus](#):
>
> I'm not sure how many more I have to remove before I can change anything in my deployment.

Well one thing you could try after you over run a cluster is all the indices turn read only etc.. etc..  
have you tried to make them writeable again?

Just a thought perhaps you already did that, you could / should check with support if they suggest / OK that if you want.

that makes all those system indices writeable again.

```
PUT /.*/_settings
{
  "index": {
    "blocks.read_only_allow_delete" : false,
    "blocks.read_only": false
  }
}

```

without the `.` it will do the same for all the other indices

```
PUT /*/_settings
{
  "index": {
    "blocks.read_only_allow_delete" : false,
    "blocks.read_only": false
  }
}

```

---

<div class="post-metadata">

**Author:** ![daniel\_at\_gus](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@daniel\_at\_gus](https://discuss.elastic.co/u/daniel_at_gus)\
**Post date:** [January 18, 2021, 7:12pm UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/5 "2021-01-18T19:12:54Z")

</div>

Hi, @stephenb.

Thanks a lot for your help.

I've performed the two methods you shared to be sure all indexes are not in a read only status. When I requested the PUT method, both endpoints answered: "acknowledged": true. Sadly, when I tried to do a change in the cluster, it failed again at the same step "Plan successful".

Do you have another clue of what I can do to solve this issue? Thanks.

 ![Captura de Pantalla 2021-01-18 a la(s) 13.10.42](https://us1.discourse-cdn.com/elastic/original/3X/4/1/414b5c267ca495be5e471ef7583a65942c10d667.png)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 18, 2021, 10:20pm UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/6 "2021-01-18T22:20:41Z")

</div>

What is the current configuration in terms of nodes and masters.

What size are they in terms of RAM and type ... Highio etc.

What Are you trying to change from what to what?

---

<div class="post-metadata">

**Author:** ![daniel\_at\_gus](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@daniel\_at\_gus](https://discuss.elastic.co/u/daniel_at_gus)\
**Post date:** [January 19, 2021, 12:26am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/7 "2021-01-19T00:26:03Z")

</div>

Hi, @stephenb. Here it is my current configuration:

1. Data (aws.data.highio.i3) : 15 GB RAM and 450 GB storage x 1 node x 2 zones = 30 GB RAM 900 GB storage
2. Master node (aws.master.r4)
3. Kibana (aws.kibana.r4): 1 GB RAM x 1 instance x 1 zone = 1 GB RAM

I'm implementing a Single Sign On mechanism through AWS Cognito using Open ID Connect. I have my realm setup but I want to change some URLs, like op.authorization\_endpoint and op.token\_endpoint. Also I want to change the claims.principal to catch the email of the user. Those are the changes I want to apply.

Thanks.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 19, 2021, 12:32am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/8 "2021-01-19T00:32:21Z")

</div>

Ok I can't really debug SSO for you.... I thought you were trying to change cluster sizes etc... The failed plan now, Typically when the plan fails fast like it says with 0 milliseconds it means you have a bad configuration / have bad settings. I would reach back out to support tell them you fixed the number of shards and ask for the detail why the plan is change failing.

---

<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:** [February 16, 2021, 12:32am UTC](https://discuss.elastic.co/t/i-cant-edit-my-deployment-because-i-have-too-many-shards-in-my-cluster/260774/9 "2021-02-16T00:32:28Z")

</div>

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