# Change queue capacity in an elastic node

**URL:** <https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780>\
**Category:** Elasticsearch\
**Created:** [October 23, 2019, 6:21am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780 "2019-10-23T06:21:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![manish\_kakoti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manish_kakoti/32/53285_2.png) [@manish\_kakoti](https://discuss.elastic.co/u/manish_kakoti)\
**Post date:** [October 23, 2019, 6:21am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/1 "2019-10-23T06:21:42Z")

</div>

I am running a local node with queue capacity of :200 , but due to large number of requests coming in, the node rejects the request when it goes beyond 200 (which is the queue capacity)

i tried setting in `thread_pool.search.queue_size : 2000` in `elasticsearch.yml` and restarted the node, but the queue capacity still remains `200`.

Any guidance on how the change the `queue_capacity` value would be much appreciated

Elastic version: 6.4

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [October 23, 2019, 6:37am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/2 "2019-10-23T06:37:36Z")

</div>

In all questions, it helps to specify which version of ES are you running?

---

<div class="post-metadata">

**Author:** ![manish\_kakoti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manish_kakoti/32/53285_2.png) [@manish\_kakoti](https://discuss.elastic.co/u/manish_kakoti)\
**Post date:** [October 23, 2019, 6:50am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/3 "2019-10-23T06:50:50Z")

</div>

updated as required

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [October 23, 2019, 7:40am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/4 "2019-10-23T07:40:40Z")

</div>

Per the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-threadpool.html),

> `search`
> 
> For count/search/suggest operations. Thread pool type is `fixed_auto_queue_size` with a size of `int((# of available_processors * 3) / 2) + 1` , and initial queue\_size of `1000` .

The [fixed\_auto\_queue\_size](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/modules-threadpool.html#fixed-auto-queue-size) thread pool holds a fixed size of threads to handle the requests with a bounded queue for pending requests that have no threads to service them. It’s similar to the `fixed` threadpool, however, the `queue_size` automatically adjusts according to calculations based on [Little’s Law](https://en.wikipedia.org/wiki/Little%27s_law). These calculations will potentially adjust the `queue_size` up or down by 50 every time `auto_queue_frame_size` operations have been completed.

Maybe you can try bumping up `max_queue_size`. However, the defaults work very well and increasing the queue size can actually be detrimental in a single-node cluster.

---

<div class="post-metadata">

**Author:** ![manish\_kakoti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manish_kakoti/32/53285_2.png) [@manish\_kakoti](https://discuss.elastic.co/u/manish_kakoti)\
**Post date:** [October 23, 2019, 7:45am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/5 "2019-10-23T07:45:36Z")

</div>

So, there is no provision to change the queue\_ capacity directly?. Also just reconfirming, the queue\_capacity readjusts itself accordingly?

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [October 23, 2019, 8:39am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/6 "2019-10-23T08:39:58Z")

</div>

> [@manish\_kakoti](#):
>
> just reconfirming, the queue\_capacity readjusts itself accordingly?

Correct

> [@manish\_kakoti](#):
>
> So, there is no provision to change the queue\_ capacity directly

You can try setting `max_queue_size` but that's the maximum range and not necessarily the value the queue will actually take.

---

<div class="post-metadata">

**Author:** ![manish\_kakoti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manish_kakoti/32/53285_2.png) [@manish\_kakoti](https://discuss.elastic.co/u/manish_kakoti)\
**Post date:** [October 23, 2019, 8:46am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/7 "2019-10-23T08:46:27Z")

</div>

setting `max_queue_size` directly on `elasticsearch.yml` throws error, saying :  
`setting [max_queue_size] please check that any required plugins are installed` is there a specific way to do that?

---

<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 20, 2019, 8:53am UTC](https://discuss.elastic.co/t/change-queue-capacity-in-an-elastic-node/204780/8 "2019-11-20T08:53:09Z")

</div>

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