# Rejected execution during search

**URL:** <https://discuss.elastic.co/t/rejected-execution-during-search/130800>\
**Category:** Elasticsearch\
**Created:** [May 7, 2018, 8:39am UTC](https://discuss.elastic.co/t/rejected-execution-during-search/130800 "2018-05-07T08:39:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [May 7, 2018, 8:39am UTC](https://discuss.elastic.co/t/rejected-execution-during-search/130800/1 "2018-05-07T08:39:50Z")

</div>

Hi all,

I am running a single instance of elastic stack in version 6.2.3 on a single server (8 CPU, 128 GB RAM).

When I am loading a complex kibana dashboard for 30 days I have following issues:

- kibana (where I query the dashboard) is running to timeout (60s). If I wait some time (a minute more or so) and retry the query, data is loaded. I assume that the original query is still running and that results are cached then.

- while the long query is running, a lot of other sessions are are getting the following exception:

Is my understanding correct, that the queue is full and therefore no new requests can be buffered?

My elasticsearch.yml changes compared to default look like this:

```
# threadpool configuration
thread_pool.search.queue_size: 5000

# tuning
processors: 4

# xpack configuration
xpack.security.enabled: false

```

In xpack monitoring I can see that the search latency is increasing and that cpu usage is at max:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/5/85876ad743a0818c1b4c2cbf419e413b975cd835.png)

OK, one step will be increasing the cpu limit, because metricbeat on the server as sum shows that I am only using 54%. So logstash will not take the rest of it and limiting to 6 or 7 processors should work.

But what I don't understand is the error message about the full queue:

`name = node-1/search, queue capacity = 1000, min queue capacity = 1000, max queue capacity = 1000`

When I check with GET \_nodes I can see the following snips:

```
"settings": {
    ...
    thread_pool": {
      "search": {
        "queue_size": "5000"
      }
    },

    ...

"thread_pool": {

    ...

    "search": {
          "type": "fixed_auto_queue_size",
          "min": 7,
          "max": 7,
          "queue_size": 5000
    },

```

So why 1000 in exception and not 5000?  
How do I increase the queue limit for node-1/search?

Any other ideas for tuning?

Thanks a lot, Andreas

---

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [May 7, 2018, 8:43am UTC](https://discuss.elastic.co/t/rejected-execution-during-search/130800/2 "2018-05-07T08:43:11Z")

</div>

is it possible to update processors directive on runtime?

---

<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:** [June 4, 2018, 8:43am UTC](https://discuss.elastic.co/t/rejected-execution-during-search/130800/3 "2018-06-04T08:43:13Z")

</div>

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