# How many scripts can be stored in elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-many-scripts-can-be-stored-in-elasticsearch/222226>\
**Category:** Elasticsearch\
**Created:** [March 5, 2020, 8:08am UTC](https://discuss.elastic.co/t/how-many-scripts-can-be-stored-in-elasticsearch/222226 "2020-03-05T08:08:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smogami](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smogami/32/26787_2.png) [@smogami](https://discuss.elastic.co/u/smogami)\
**Post date:** [March 5, 2020, 8:08am UTC](https://discuss.elastic.co/t/how-many-scripts-can-be-stored-in-elasticsearch/222226/1 "2020-03-05T08:08:09Z")

</div>

I would like to know how many scripts can be stored in single elasticsearch cluster.  
Is it limitless, or is there any hard limit ?

I found the limit of script size, but could not find the limit of number of scripts.

> [How to write scripts | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html)  
> The size of scripts is limited to 65,535 bytes. This can be changed by setting `script.max_size_in_bytes` setting to increase that soft limit, but if scripts are really large then a [native script engine](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-engine.html) should be considered.

---

<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:** [March 5, 2020, 7:30pm UTC](https://discuss.elastic.co/t/how-many-scripts-can-be-stored-in-elasticsearch/222226/2 "2020-03-05T19:30:15Z")

</div>

I don't believe there is a limit on them. That said, I'm not sure having tens of thousands of them makes sense either, as they can be potentially computationally expensive.

What are you looking to do that has you asking this question?

---

<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:** [April 2, 2020, 7:30pm UTC](https://discuss.elastic.co/t/how-many-scripts-can-be-stored-in-elasticsearch/222226/3 "2020-04-02T19:30:18Z")

</div>

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