# Rejected Execution exception

**URL:** <https://discuss.elastic.co/t/rejected-execution-exception/149084>\
**Category:** Elasticsearch\
**Created:** [September 19, 2018, 8:44am UTC](https://discuss.elastic.co/t/rejected-execution-exception/149084 "2018-09-19T08:44:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giuseppe\_Merlo](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@Giuseppe\_Merlo](https://discuss.elastic.co/u/Giuseppe_Merlo)\
**Post date:** [September 19, 2018, 8:44am UTC](https://discuss.elastic.co/t/rejected-execution-exception/149084/1 "2018-09-19T08:44:19Z")

</div>

Hi everyone.

I'm using ES in a development system and i've got this error using a search request.

I tried to change queue\_size from 1000 to 10000 but this didn't work:

`Trace: [es_rejected_execution_exception] rejected execution of org.elasticsearch.common.util.concurrent.TimedRunnable@2dd06f7 on QueueResizingEsThreadPoolExecutor[name = u86W95s/search, queue capacity = 1000, min queue capacity = 1000, max queue capacity = 1000, frame size = 2000, targeted response rate = 15s, task execution EWMA = 1micros, adjustment amount = 50, org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor@19adeb5c[Running, pool size = 6, active threads = 6, queued tasks = 2050, completed tasks = 234010]] (and) [es_rejected_execution_exception] rejected execution of org.elasticsearch.common.util.concurrent.TimedRunnable@735bdafe on QueueResizingEsThreadPoolExecutor[name = u86W95s/search, queue capacity = 1000, min queue capacity = 1000, max queue capacity = 1000, frame size = 2000, targeted response rate = 15s, task execution EWMA = 1micros, adjustment amount = 50, org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor@19adeb5c[Running, pool size = 6, active threads = 6, queued tasks = 2050, completed tasks = 234010]] (and) [es_rejected_execution_exception] rejected execution of org.elasticsearch.common.util.concurrent.TimedRunnable@73ab4a0 on QueueResizingEsThreadPoolExecutor[name = u86W95s/search, queue capacity = 1000, min queue capacity = 1000, max queue capacity = 1000, frame size = 2000, targeted response rate = 15s, task execution EWMA = 1micros, adjustment amount = 50, org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor@19adeb5c[Running, pool size = 6, active threads = 6, queued tasks = 2052, completed tasks = 234010]] (and) [es_rejected_execution_exception] rejected execution of org.elasticsearch.common.util.concurrent.TimedRunnable@2f40f298 on QueueResizingEsThreadPoolExecutor[name = u86W95s/search, queue capacity = 1000, min queue capacity = 1000, max queue capacity = 1000, frame size = 2000, targeted response rate = 15s, task execution EWMA = 118.5micros, adjustment amount = 50, org.elasticsearch.common.util.concurrent.QueueResizingEsThreadPoolExecutor@19adeb5c[Running, pool size = 6, active threads = 6, queued tasks = 1335, completed tasks = 237563]]`

It seems queue\_size is not affected by my request.  
Moreover, i tried to set thread\_pool size but this didn't work too.  
For more information, we are 3 developers that call ES in parallel from 3 different machines.

Can anyone help me? Thanks!

---

<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:** [September 20, 2018, 12:00pm UTC](https://discuss.elastic.co/t/rejected-execution-exception/149084/2 "2018-09-20T12:00:45Z")

</div>

Elasticsearch is telling you with this error message, that it is running at capacity and its thread pool is filled. It's hard to tell anything further without more information.

It just seems you are sending a lot of requests in parallel instead of waiting for some requests to return before sending the next ones - you might want to check your application code for that.

---

<div class="post-metadata">

**Author:** ![Giuseppe\_Merlo](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@Giuseppe\_Merlo](https://discuss.elastic.co/u/Giuseppe_Merlo)\
**Post date:** [September 20, 2018, 1:06pm UTC](https://discuss.elastic.co/t/rejected-execution-exception/149084/3 "2018-09-20T13:06:29Z")

</div>

Thank you for your reply.

I don't understand why ES doesn't get my new Thread\_Pool or Queue\_Size settings.

However, i'll try to differently setup my application requests.

---

<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:** [October 18, 2018, 1:06pm UTC](https://discuss.elastic.co/t/rejected-execution-exception/149084/4 "2018-10-18T13:06:38Z")

</div>

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