# Watcher action error

**URL:** <https://discuss.elastic.co/t/watcher-action-error/89618>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [June 15, 2017, 7:27pm UTC](https://discuss.elastic.co/t/watcher-action-error/89618 "2017-06-15T19:27:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![santhosh](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@santhosh](https://discuss.elastic.co/u/santhosh)\
**Post date:** [June 15, 2017, 7:27pm UTC](https://discuss.elastic.co/t/watcher-action-error/89618/1 "2017-06-15T19:27:22Z")

</div>

I have noticed this exception in watcher history. I couldn't find much answers on internet, but by looking through the error statement, I can understand it suggests not to run more watch at same time. In our server, there are no other watch configured to execute at same minute, but there are few runs in same hour. What is the reason for this error?

```
"actions": [
              {
                "id": "email_administrator",
                "type": "email",
                "status": "failure",
                "reason": "GeneralScriptException[Failed to compile inline script [Watcher alert] using lang [mustache]]; nested: CircuitBreakingException[[script] Too many dynamic script compilations within one minute, max: [15/min]; please use on-disk, indexed, or scripts with parameters instead; this limit can be changed by the [script.max_compilations_per_minute] setting]; "
              }
            ]
```

---

<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:** [June 16, 2017, 6:16am UTC](https://discuss.elastic.co/t/watcher-action-error/89618/2 "2017-06-16T06:16:48Z")

</div>

Hey,

this means, there are some script compilations going on - I suppose you also have queries that use scripting. You should try to not trigger new compilation of scripts that often as that is a performance issue. Instead you should reuse the same scripts and use parameters for dynamic changes (i.e. thresholds).

For more information follow the docs about the [script circuit breaker](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/circuit-breaker.html#script-compilation-circuit-breaker)

--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:** [July 14, 2017, 6:17am UTC](https://discuss.elastic.co/t/watcher-action-error/89618/3 "2017-07-14T06:17:36Z")

</div>

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