# Increase queue size

**URL:** https://discuss.elastic.co/t/increase-queue-size/31756
**Category:** Elasticsearch
**Created:** [October 7, 2015, 8:28am UTC](https://discuss.elastic.co/t/increase-queue-size/31756 "2015-10-07T08:28:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [October 7, 2015, 8:28am UTC](https://discuss.elastic.co/t/increase-queue-size/31756/1 "2015-10-07T08:28:31Z")

</div>

Since I often get: org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution (queue capacity 1000) on org.elasticsearch.search.action.SearchServiceTransportAction$23@644df44e

and warnings in kibana, I would like to increase the queue size. I am reading the documentation [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html) since it is referred to everywhere I read about this. But that documentation does not really tell me where to configure this and how. Is it in the configuration file? And is multiline syntax ok in the configuration-file, like:

```
threadpool:
    index:
        type: fixed
        size: 30
        queue_size: 1000

```

?  
Thanks.

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [October 7, 2015, 8:43am UTC](https://discuss.elastic.co/t/increase-queue-size/31756/2 "2015-10-07T08:43:09Z")

</div>

This goes into elasticsearch.yml or as a dynamic setting that you post via REST (the latter is obviously easier to change since you won't have to bounce each node). The syntax in your example is fine.

Your thread pools are exhausted because your cluster is underpowered for its load. Increasing the queue size should result in more queries completing but won't help with your presumably really bad response times.

---

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [October 7, 2015, 9:16am UTC](https://discuss.elastic.co/t/increase-queue-size/31756/3 "2015-10-07T09:16:25Z")

</div>

Hi Magnus.

Thank you for your reply.

I don't get bad response-times and this error only occurs when I load a kibana dashboard with 18 visualisations.

---

<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 5, 2017, 11:46pm UTC](https://discuss.elastic.co/t/increase-queue-size/31756/4 "2017-07-05T23:46:12Z")

</div>


