# Upping the value of set script.max\_compilations\_per\_minute

**URL:** <https://discuss.elastic.co/t/upping-the-value-of-set-script-max-compilations-per-minute/76249>\
**Category:** Elasticsearch\
**Created:** [February 23, 2017, 3:09pm UTC](https://discuss.elastic.co/t/upping-the-value-of-set-script-max-compilations-per-minute/76249 "2017-02-23T15:09:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fassisrosa](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fassisrosa](https://discuss.elastic.co/u/fassisrosa)\
**Post date:** [February 23, 2017, 3:09pm UTC](https://discuss.elastic.co/t/upping-the-value-of-set-script-max-compilations-per-minute/76249/1 "2017-02-23T15:09:18Z")

</div>

Hey there,

I am currently bumping into the error:

org.elasticsearch.common.breaker.CircuitBreakingException: [script] Too many dynamic script compilations within one minute

The nature of the application I am working on is such that you can potentially have several distinct filter expressions for which the parameter approach will not help much. I was thinking about bumping up this value in elasticsearch.yml to a much larger number than the default of 15/min.

Questions are:

1. Is there any top recommendation for the largest number we could put here?
2. What is the potential impact of having a larger number here?

Thanks,

Francisco.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 27, 2017, 8:59am UTC](https://discuss.elastic.co/t/upping-the-value-of-set-script-max-compilations-per-minute/76249/2 "2017-02-27T08:59:57Z")

</div>

Hey,

the idea here is, that you should not waste too much CPU time compiling scripts. So maybe it makes more sense to use indexed scripts or file-based scripts or scripts with parameters, so that the script itself does not need to be recompiled. if you are fine with the resources needed (as a single request suddently becomes much more expensive), you can set it to a higher value.

--Alex

---

<div class="post-metadata">

**Author:** ![fassisrosa](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fassisrosa](https://discuss.elastic.co/u/fassisrosa)\
**Post date:** [February 28, 2017, 7:54pm UTC](https://discuss.elastic.co/t/upping-the-value-of-set-script-max-compilations-per-minute/76249/3 "2017-02-28T19:54:05Z")

</div>

Thanks Alex!

---

<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:** [March 28, 2017, 7:54pm UTC](https://discuss.elastic.co/t/upping-the-value-of-set-script-max-compilations-per-minute/76249/4 "2017-03-28T19:54:23Z")

</div>

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