# Rejected execution

**URL:** <https://discuss.elastic.co/t/rejected-execution/240984>\
**Category:** Elasticsearch\
**Created:** [July 13, 2020, 1:57pm UTC](https://discuss.elastic.co/t/rejected-execution/240984 "2020-07-13T13:57:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [July 13, 2020, 1:57pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/1 "2020-07-13T13:57:17Z")

</div>

Hello World!

I'm using Elasticsearch 6.8.10 and trying to run a query, yet running into following issue:

```
{
   "shard" : 3,
   "node" : "koEOgkkDBhOVfKHA7QXBjj",
   "reason" : {
      "reason" : "rejected execution of org.elasticsearch.common.util.concurrent.TimedRunnable@26c03d4a on QueueResizingEsThreadPoolExecutor[name = esdX/search, queue capacity = 1000, min queue capacity = 1000, max queue capacity = 1000, frame size = 2000, targeted response rate = 1s, task execution EWMA = 968.1ms, adjustment amount = 50, org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor@70be0765[Running, pool size = 13, active threads = 13, queued tasks = 1000, completed tasks = 616499351]]",
      "type" : "es_rejected_execution_exception"
   },
   "index" : "X-X-X"
}

```

Please advise.  
Thanks in advance!

---

<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:** [July 13, 2020, 9:48pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/2 "2020-07-13T21:48:31Z")

</div>

Sounds like Elasticsearch is overloaded.  
Do you have [Monitoring](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/monitor-elasticsearch-cluster.html) enabled?

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [July 13, 2020, 10:36pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/3 "2020-07-13T22:36:22Z")

</div>

- search rate = ~2-3k
- search latency (ms) = ~1ms
- index rate = ~3-4k
- indexing latency (ms) = ~\>0.5ms

---

<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:** [July 13, 2020, 10:39pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/4 "2020-07-13T22:39:17Z")

</div>

Ok, but do you have Monitoring enabled?  
What do your threadpools look like? CPU? heap?

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [July 13, 2020, 10:41pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/5 "2020-07-13T22:41:17Z")

</div>

I do, I think it's "basic" though, so I can't see threadpools, CPU or heap...

---

<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:** [July 13, 2020, 10:42pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/6 "2020-07-13T22:42:26Z")

</div>

You can definitely see them in Kibana if you have it enabled.

If not, then the `_cat/` APIs will be able to show you.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [July 13, 2020, 10:44pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/7 "2020-07-13T22:44:18Z")

</div>

... sorry, I take it back, I was able to see that via node, but which node do I check? query running across multiple indices..

on one of the random data nodes: heap is about 20G, CPU utilization isn't showing..

`indexing threads` are ~0 and `read threads` are ~0

---

<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:** [July 14, 2020, 2:13am UTC](https://discuss.elastic.co/t/rejected-execution/240984/8 "2020-07-14T02:13:44Z")

</div>

The node in your original post is `koEOgkkDBhOVfKHA7QXBjj`.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [July 14, 2020, 2:05pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/9 "2020-07-14T14:05:58Z")

</div>

oh right, sorry)

I added another node and query didn't fail, so I guess you were right that it was under heavy load..

meanwhile, I'll do some reading of [Thread Pool | Elasticsearch Reference [6.8] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-threadpool.html)

Thanks!

---

<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:** [August 11, 2020, 2:06pm UTC](https://discuss.elastic.co/t/rejected-execution/240984/10 "2020-08-11T14:06:00Z")

</div>

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