# Watcher input search failing due to exceeded dynamic compilation

**URL:** <https://discuss.elastic.co/t/watcher-input-search-failing-due-to-exceeded-dynamic-compilation/286087>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [October 7, 2021, 2:52am UTC](https://discuss.elastic.co/t/watcher-input-search-failing-due-to-exceeded-dynamic-compilation/286087 "2021-10-07T02:52:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munavir\_Chavody](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/munavir_chavody/32/87951_2.png) [@Munavir\_Chavody](https://discuss.elastic.co/u/Munavir_Chavody)\
**Post date:** [October 7, 2021, 2:52am UTC](https://discuss.elastic.co/t/watcher-input-search-failing-due-to-exceeded-dynamic-compilation/286087/1 "2021-10-07T02:52:01Z")

</div>

I'm getting dynamic execution circuit breaking error for many watchers in our environment saying that the input search query failed to compile.

What is the reason for the same. How can we avoid such errors at all?

Error:

 ![heatbeat-prodazje](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8e6a85a92d67499ebb2d9c148fabe8c76ef8da04.jpeg)

Watcher:

```auto
"input": {
    "search": {
      "request": {
        "search_type": "query_then_fetch",
        "indices": [
          "heartbeat-*"
        ],
        "rest_total_hits_as_int": true,
        "body": {
          "query": {
            "bool": {
              "must": [
                {
                  "range": {
                    "@timestamp": {
                      "gte": "now-5m"
                    }
                  }
                },
                {
                  "term": {
                    "monitor.name": " *******"
                  }
                },
                {
                  "term": {
                    "monitor.status": "down"
                  }
                }
              ]
            }
          },
          "size": 100
        }
      }
    }
  }

```

---

<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:** [October 11, 2021, 12:51am UTC](https://discuss.elastic.co/t/watcher-input-search-failing-due-to-exceeded-dynamic-compilation/286087/2 "2021-10-11T00:51:53Z")

</div>

Please don't post pictures of text or code. They are difficult to read, impossible to search and replicate (if it's code), and some people may not be even able to see them 🙂

---

<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:** [November 8, 2021, 12:52am UTC](https://discuss.elastic.co/t/watcher-input-search-failing-due-to-exceeded-dynamic-compilation/286087/3 "2021-11-08T00:52:28Z")

</div>

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