# Shared limit

**URL:** https://discuss.elastic.co/t/shared-limit/222057
**Category:** Elasticsearch
**Created:** [March 4, 2020, 11:09am UTC](https://discuss.elastic.co/t/shared-limit/222057 "2020-03-04T11:09:44Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 4, 2020, 11:09am UTC](https://discuss.elastic.co/t/shared-limit/222057/1 "2020-03-04T11:09:44Z")

</div>

Hi,  
i got this error when i tried to add some indices in AWS-ES  
`but this cluster currently has [1992]/[2000] maximum shards open`  
how can i solve this, if i want to keep that ES creates a delay index for each logs

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 4, 2020, 12:26pm UTC](https://discuss.elastic.co/t/shared-limit/222057/2 "2020-03-04T12:26:46Z")

</div>

Increase the number of nodes or reduce the number of shards per index.

What is the output of:

```auto
GET /
GET /_cat/nodes?v
GET /_cat/health?v
GET /_cat/indices?v

```

If some outputs are too big, please share them on [gist.github.com](http://gist.github.com) and link them here.

BTW did you look at [https://www.elastic.co/cloud](https://www.elastic.co/cloud) and [https://aws.amazon.com/marketplace/pp/B01N6YCISK](https://aws.amazon.com/marketplace/pp/B01N6YCISK) ?

Cloud by elastic is one way to have access to all features, all managed by us. Think about what is there yet like Security, Monitoring, Reporting, SQL, Canvas, APM, Logs UI, Infra UI, SIEM, Maps UI, AppSearch and what is coming next 🙂 ...

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 4, 2020, 12:53pm UTC](https://discuss.elastic.co/t/shared-limit/222057/3 "2020-03-04T12:53:52Z")

</div>

Hi @dadoonet  
thanks for ur quick reply, these the output of the mentioned commands

```
GET /
{
      "name" : "4ad0667b83bbe4b0b46d9c687fff253f",
      "cluster_name" : "753188385451:geophy-logssystem",
      "cluster_uuid" : "Dcyeu21UT1S7fL7weR1LBw",
      "version" : {
    "number" : "7.1.1",
    "build_flavor" : "oss",
    "build_type" : "tar",
    "build_hash" : "7a013de",
    "build_date" : "2019-10-08T13:47:09.433683Z",
    "build_snapshot" : false,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
      },
      "tagline" : "You Know, for Search"
    }

    GET /_cat/nodes?v
    ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
    x.x.x.x 5 81 1 0.00 0.17 0.41 mdi - 4ad0667b83bbe4b0b46d9c687fff253f
    x.x.x.x 7 81 3 0.29 0.32 0.55 mdi * 542a9d72469d4dd9373b0099d18c4a2f

GET /_cat/health?v
epoch timestamp cluster status node.total node.data discovered_master shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1583325975 12:46:15 753188385451:xxxxxxxx green 2 2 true 2182 1091 0 0 0 0 - 100.0%
```

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 4, 2020, 12:59pm UTC](https://discuss.elastic.co/t/shared-limit/222057/4 "2020-03-04T12:59:11Z")

</div>

for command GET /\_cat/indices?v, all my indices in open status and green healthy

```auto
    health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
    green open index1 XeOgZ3p3SF-VIBlL-OGB9A 5 1 5274 0 6.9mb 3.4mb
    green open index2 Ynqo_kVyRaG_zhXgpf7I8w 5 1 102 0 273kb 139.6kb
    green open evra-prod-alb-logs-2020.02.21 aMkKlQqEQOaGzt3KBBkhQg 5 1 23387 0 46.8mb 23.4mb
    green open index3 8V-QPY4TRsyCJpVDbPAo5w 5 1 508 0 3.1mb 1.5mb
    green open index4 fW6SQdbgQFO5wGwi0l1HGg 5 1 270 0 424.5kb 212.2kb
    green open index5 VsTizVaLTU68ovVVEfQ93w 5 1 12708 0 16.9mb 8.4mb
    green open index6 abMOPfiNTrCRZ68bvGe0eA 5 1 70703 0 92.6mb 46.3mb
    green open index7 8oJz97tUQ5-cKdzOQq0vRQ 5 1 3361 0 3.3mb 1.6mb
    green open index8 buH2H7lmSNOiLHdOvjFnoA 5 1 576 0 1mb 513.5kb
    green open index9 4JPdqg62SEGHp9KUtbOYaA 5 1 7695 0 13.4mb 6.7mb
    green open index10 WsOR1c8GTuKSERk4kkfwEQ 5 1 1187 0 2.3mb 1.1mb

```

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 4, 2020, 1:09pm UTC](https://discuss.elastic.co/t/shared-limit/222057/5 "2020-03-04T13:09:15Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 4, 2020, 1:11pm UTC](https://discuss.elastic.co/t/shared-limit/222057/6 "2020-03-04T13:11:53Z")

</div>

sorry @dadoonet, just edited

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 4, 2020, 4:44pm UTC](https://discuss.elastic.co/t/shared-limit/222057/7 "2020-03-04T16:44:25Z")

</div>

I highly doubt of this last output...

I can see 50 primary shards here where you have reported in total 1091 primaries.

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 5, 2020, 12:14am UTC](https://discuss.elastic.co/t/shared-limit/222057/8 "2020-03-05T00:14:11Z")

</div>

@dadoonet  
ys i didn't copy full output but all of them in started status

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 5, 2020, 2:25am UTC](https://discuss.elastic.co/t/shared-limit/222057/9 "2020-03-05T02:25:35Z")

</div>

So I can just guess.

You probably have too many shards per node.

May I suggest you look at the following resources about sizing:

[https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing](https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing)

> **[How many shards should I have in my Elasticsearch cluster?](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)**
>
> If you are looking for practical guidelines around how many indices and shards to have in your cluster, this blog post will help you avoid common pitfalls.

https://www.slideshare.net/slideshow/embed_code/key/vR0XKDq4TGa77z

And [https://www.elastic.co/webinars/using-rally-to-get-your-elasticsearch-cluster-size-right](https://www.elastic.co/webinars/using-rally-to-get-your-elasticsearch-cluster-size-right)

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 5, 2020, 7:40am UTC](https://discuss.elastic.co/t/shared-limit/222057/10 "2020-03-05T07:40:08Z")

</div>

Thanks @dadoonet  
sorry, how can i change the number of shared per index and is it recommended to change to monthly index instead of daily index ?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 5, 2020, 8:07am UTC](https://discuss.elastic.co/t/shared-limit/222057/11 "2020-03-05T08:07:07Z")

</div>

For existing indices the shrink API might be used.  
For coming indices, create or modify the index template.

Monthly, yearly indices might be a good option. It depends on the index you have today. As you didn't want to share the full output, I can't really tell.

But you can also look at the rollover API.

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 5, 2020, 10:51am UTC](https://discuss.elastic.co/t/shared-limit/222057/12 "2020-03-05T10:51:05Z")

</div>

sorrry @dadoonet. it's too long 😃

```auto

app2-prod-app-logs-2020.02.18 1 r STARTED 1534 587.8kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.18 1 p STARTED 1534 587.8kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.18 2 p STARTED 1463 570kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.18 2 r STARTED 1463 570kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.18 4 p STARTED 1452 565.6kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.18 4 r STARTED 1452 565.6kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.18 3 r STARTED 1500 574.6kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.18 3 p STARTED 1500 574.6kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.18 0 p STARTED 1474 582.1kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.18 0 r STARTED 1474 582.1kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-elb-access-log-2020.03.04 1 p STARTED 1683 1.8mb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-elb-access-log-2020.03.04 1 r STARTED 1683 1.7mb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-elb-access-log-2020.03.04 2 r STARTED 1725 1.8mb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-elb-access-log-2020.03.04 2 p STARTED 1725 1.9mb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-elb-access-log-2020.03.04 4 r STARTED 1717 2mb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-elb-access-log-2020.03.04 4 p STARTED 1717 2mb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-elb-access-log-2020.03.04 3 p STARTED 1644 1.8mb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-elb-access-log-2020.03.04 3 r STARTED 1644 1.7mb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-elb-access-log-2020.03.04 0 r STARTED 1743 2mb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-elb-access-log-2020.03.04 0 p STARTED 1743 2mb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959

```

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 5, 2020, 10:52am UTC](https://discuss.elastic.co/t/shared-limit/222057/13 "2020-03-05T10:52:37Z")

</div>

there is limit to past all there ☹

```auto
app2-prod-app-logs-2020.02.13 1 p STARTED 215 162.3kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.13 1 r STARTED 215 162.3kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.13 2 r STARTED 150 125.1kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.13 2 p STARTED 150 125.1kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.13 4 r STARTED 168 134.6kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.13 4 p STARTED 168 134.6kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.13 3 p STARTED 183 144.6kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.13 3 r STARTED 183 144.6kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-app-logs-2020.02.13 0 r STARTED 194 150.8kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-app-logs-2020.02.13 0 p STARTED 194 150.8kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959

app1-prod-alb-logs-2020.02.15 1 r STARTED 777 916.7kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app1-prod-alb-logs-2020.02.15 1 p STARTED 777 916.7kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app1-prod-alb-logs-2020.02.15 2 p STARTED 724 910.5kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app1-prod-alb-logs-2020.02.15 2 r STARTED 724 910.5kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app1-prod-alb-logs-2020.02.15 4 p STARTED 754 732.8kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app1-prod-alb-logs-2020.02.15 4 r STARTED 754 732.8kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app1-prod-alb-logs-2020.02.15 3 r STARTED 767 913.1kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app1-prod-alb-logs-2020.02.15 3 p STARTED 767 913.1kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app1-prod-alb-logs-2020.02.15 0 p STARTED 750 821.5kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app1-prod-alb-logs-2020.02.15 0 r STARTED 750 821.5kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959

app2-prod-alb-logs-2020.02.16 1 r STARTED 796 742.3kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-alb-logs-2020.02.16 1 p STARTED 796 742.3kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-alb-logs-2020.02.16 2 p STARTED 769 823.8kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-alb-logs-2020.02.16 2 r STARTED 769 823.8kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-alb-logs-2020.02.16 4 p STARTED 737 820.6kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-alb-logs-2020.02.16 4 r STARTED 737 820.6kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-alb-logs-2020.02.16 3 r STARTED 778 752.8kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-alb-logs-2020.02.16 3 p STARTED 778 752.8kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959
app2-prod-alb-logs-2020.02.16 0 p STARTED 725 729.9kb x.x.x.x 1688eee859e2418e813042d0b9f41f06
app2-prod-alb-logs-2020.02.16 0 r STARTED 725 729.9kb x.x.x.x f9d895cc2b7d1a07911e23dd1ae22959

```

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 5, 2020, 11:05am UTC](https://discuss.elastic.co/t/shared-limit/222057/14 "2020-03-05T11:05:05Z")

</div>

You have so small indices that only one index with one single shard would be probably enough.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 5, 2020, 11:06am UTC](https://discuss.elastic.co/t/shared-limit/222057/15 "2020-03-05T11:06:44Z")

</div>

You can share the output on [gist.github.com](http://gist.github.com) as well.

I'm more interested by the following than the `/_cat/shards`

```
GET /_cat/indices?v
```

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 5, 2020, 11:31am UTC](https://discuss.elastic.co/t/shared-limit/222057/17 "2020-03-05T11:31:56Z")

</div>

@dadoonet  
so i should set 1 shared to each index, right?

> <https://gist.github.com/amna-ali/a259cf219feb4a25ae0c89aa52c7fea8>

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 5, 2020, 1:04pm UTC](https://discuss.elastic.co/t/shared-limit/222057/18 "2020-03-05T13:04:21Z")

</div>

With the size of your indices, I think that one single index with one single shard is enough.

---

<div class="post-metadata">

### Author: ![Amna\_sayed\_ali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amna_sayed_ali/32/45433_2.png) [@Amna\_sayed\_ali](https://discuss.elastic.co/u/Amna_sayed_ali)
#### Post date: [March 11, 2020, 4:35pm UTC](https://discuss.elastic.co/t/shared-limit/222057/19 "2020-03-11T16:35:26Z")

</div>

@dadoonet  
how can i set the default value for number of shared limit for coming indices. if i have different indices .

Also when i try to shrink the exist indices by shrink API "[https://blog.ruanbekker.com/blog/2019/04/06/shrink-your-elasticsearch-index-by-reducing-the-shard-count-with-the-shards-api/](https://blog.ruanbekker.com/blog/2019/04/06/shrink-your-elasticsearch-index-by-reducing-the-shard-count-with-the-shards-api/)", got the below error

`"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[f9d895cc2b7d1a07911e23dd1ae22959][x.x.x.x:9300][indices:admin/create]"}],"type":"illegal_argument_exception","reason":"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [2172]/[2000] maximum shards open;"},"status":400}[ec2-user@ip-172-20-1-235 ~]`

i need to create target index to archive the exist ones

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 3, 2020, 3:33pm UTC](https://discuss.elastic.co/t/shared-limit/222057/20 "2020-04-03T15:33:24Z")

</div>

You can may be temporary change the current limit with [https://www.elastic.co/guide/en/elasticsearch/reference/7.6/misc-cluster.html#cluster-shard-limit](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/misc-cluster.html#cluster-shard-limit)

---

<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 1, 2020, 3:33pm UTC](https://discuss.elastic.co/t/shared-limit/222057/21 "2020-05-01T15:33:25Z")

</div>

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