# Maximum shards open

**URL:** https://openvidu.discourse.group/t/maximum-shards-open/4115
**Category:** Issues with deployment
**Tags:** v2
**Created:** [July 26, 2022, 8:31am UTC](https://openvidu.discourse.group/t/maximum-shards-open/4115 "2022-07-26T08:31:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jimahn.Park](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jimahn.Park](https://openvidu.discourse.group/u/Jimahn.Park)
#### Post date: [July 26, 2022, 8:31am UTC](https://openvidu.discourse.group/t/maximum-shards-open/4115/1 "2022-07-26T08:31:45Z")

</div>

Greetings with an error message related to dynamic mapping after a long time

on: openvidu 2.20  
i got the follow message from Openvidu server 2.20

““type”:“validation\_exception”,“reason”:“Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [1000]/[1000] maximum shards open;”}],“type”:“validation\_exception”,“reason”:“Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [1000]/[1000] maximum shards open;”},“status”:400}”

index-openvidu uses dynamic mapping of documents. right?  
index-openvidu is not created by date, so the file is constantly growing.  
So I can’t solve the above problem by applying lifecycle rule

So I did it like this:

PUT openvidu/\_settings { “index.mapping.total\_fields.limit”: 2000 }

But as a result of Googling, it is said that it is a temporary process, so can I turn off the dynamic mapping as shown below? and is it no problem?

PUT openvidu { “mappings”: { “dynamic”: false } }

---

<div class="post-metadata">

### Author: ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)
#### Post date: [July 26, 2022, 9:35am UTC](https://openvidu.discourse.group/t/maximum-shards-open/4115/2 "2022-07-26T09:35:35Z")

</div>

It should not be a problem. Are you using OpenSearch?

There is an scheduled job in OpenVidu Server which deletes documents older than days defined at `OPENVIDU_PRO_ELASTICSEARCH_MAX_DAYS_DELETE`. Maybe the content of that index is too high.

---

<div class="post-metadata">

### Author: ![Jimahn.Park](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jimahn.Park](https://openvidu.discourse.group/u/Jimahn.Park)
#### Post date: [July 26, 2022, 11:24pm UTC](https://openvidu.discourse.group/t/maximum-shards-open/4115/3 "2022-07-26T23:24:59Z")

</div>

`OPENVIDU_PRO_ELASTICSEARCH_MAX_DAYS_DELETE` doesn’t work on openvidu index but other indexes.  
Docs count on openvidu index is 26186461, and Storage size is 8.5gb.

and i used elasticsearch in Openvidu. not aws OpenSearch.

thanks.
