# Too many dynamic script compilations with stored script

**URL:** <https://discuss.elastic.co/t/too-many-dynamic-script-compilations-with-stored-script/256354>\
**Category:** Elasticsearch\
**Created:** [November 23, 2020, 12:46pm UTC](https://discuss.elastic.co/t/too-many-dynamic-script-compilations-with-stored-script/256354 "2020-11-23T12:46:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwinkler](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@cwinkler](https://discuss.elastic.co/u/cwinkler)\
**Post date:** [November 23, 2020, 12:46pm UTC](https://discuss.elastic.co/t/too-many-dynamic-script-compilations-with-stored-script/256354/1 "2020-11-23T12:46:50Z")

</div>

With Elasticsearch 7.10 we are getting the following error when using a **stored** script.

```
ElasticsearchException[Elasticsearch exception [type=general_script_exception, reason=Failed to compile stored script [updateMessageV4] using lang [painless]]]; nested: ElasticsearchException[Elasticsearch exception [type=circuit_breaking_exception, reason=[script] Too many dynamic script compilations within, max: [75/5m]; please use indexed, or scripts with parameters instead;...

```

The script is correctly found under `stored_scripts` when requesting `_cluster/state`  
I would expect the script to be compiled just once.

And it actually worked fine before with Elasticsearch 7.7

---

<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:** [December 21, 2020, 12:46pm UTC](https://discuss.elastic.co/t/too-many-dynamic-script-compilations-with-stored-script/256354/2 "2020-12-21T12:46:55Z")

</div>

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