# How i can increase thread pool queue size in Elasticsearch 5.6

**URL:** https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661
**Category:** Elasticsearch
**Created:** [August 23, 2018, 6:32am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661 "2018-08-23T06:32:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![amitshar04](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amitshar04](https://discuss.elastic.co/u/amitshar04)
#### Post date: [August 23, 2018, 6:32am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/1 "2018-08-23T06:32:02Z")

</div>

thread pool queue size

how can make changes in elasticsearch.yml file for increasing thread pool queue size setting ?  
i am using Elasticsearch 5.6

Please help !!

---

<div class="post-metadata">

### Author: ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)
#### Post date: [August 23, 2018, 6:52am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/2 "2018-08-23T06:52:59Z")

</div>

> [@amitshar04](#):
>
> how can make changes in elasticsearch.yml file for increasing thread pool queue size setting ?

If you want to increase the maximum search thread pool queue size from the default 1000 to for instance 2000, just add the following to your **elasticsearch.yml** file

`thread_pool.search.max_queue_size: 2000`

and then restart the node for the setting to take effect. Repeat on the other nodes in the cluster.

---

<div class="post-metadata">

### Author: ![amitshar04](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amitshar04](https://discuss.elastic.co/u/amitshar04)
#### Post date: [August 23, 2018, 7:05am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/3 "2018-08-23T07:05:41Z")

</div>

thanks @Bernt_Rostad  
i tried that but its not working

[2018-08-23T07:04:28,079][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [[es-master01.mykaarma.com](http://es-master01.mykaarma.com)] uncaught exception in thread [main]  
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [thread\_pool.search.max\_queue\_size] did you mean any of [thread\_pool.search.queue\_size, thread\_pool.get.queue\_size, thread\_pool.force\_merge.queue\_size]?  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.4.jar:5.6.4]  
Caused by: java.lang.IllegalArgumentException: unknown setting [thread\_pool.search.max\_queue\_size] did you mean any of [thread\_pool.search.queue\_size, thread\_pool.get.queue\_size, thread\_pool.force\_merge.queue\_size]?  
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:293) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:256) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.common.settings.SettingsModule.(SettingsModule.java:139) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.node.Node.(Node.java:344) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.node.Node.(Node.java:245) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:233) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.4.jar:5.6.4]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.4.jar:5.6.4]  
... 6 more

---

<div class="post-metadata">

### Author: ![amitshar04](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amitshar04](https://discuss.elastic.co/u/amitshar04)
#### Post date: [August 23, 2018, 7:06am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/4 "2018-08-23T07:06:59Z")

</div>

tried these settings too

did you mean any of [thread\_pool.search.queue\_size, thread\_pool.get.queue\_size, thread\_pool.force\_merge.queue\_size]?

but no luck ☹

---

<div class="post-metadata">

### Author: ![amitshar04](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amitshar04](https://discuss.elastic.co/u/amitshar04)
#### Post date: [August 23, 2018, 7:09am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/5 "2018-08-23T07:09:12Z")

</div>

i want to increase this value to 2000

```
    "bulk" : {
      "type" : "fixed",
      "min" : 4,
      "max" : 4,
      "queue_size" : 200
    },
```

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [August 23, 2018, 7:25am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/6 "2018-08-23T07:25:49Z")

</div>

Before updating the bulk queue size, please read [this blog post](https://www.elastic.co/blog/why-am-i-seeing-bulk-rejections-in-my-elasticsearch-cluster) on the topic.

---

<div class="post-metadata">

### Author: ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)
#### Post date: [August 23, 2018, 7:31am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/7 "2018-08-23T07:31:28Z")

</div>

> [@amitshar04](#):
>
> java.lang.IllegalArgumentException: unknown setting [thread\_pool.search.max\_queue\_size]

I'm sorry for that bad advise ☹

I see now that the setting I mentioned was introduced **after** version 5.6 (I'm currently using it in a 6.2 cluster where it works fine). I don't think the maximum queue size can be changed in 5.6, at least if I correctly understand the official [Thread Pool](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/modules-threadpool.html) documentation:

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

The search thread pool queue size seems to be fixed to 1000 in version 5.6, as your failed attempts to change it proves. I see there is a **thread\_pool.index.size** in 5.6 but that is something different, so unless you can upgrade your cluster to version 6.2 or higher I don't think you can change the search thread pool size.

---

<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: [September 20, 2018, 7:40am UTC](https://discuss.elastic.co/t/how-i-can-increase-thread-pool-queue-size-in-elasticsearch-5-6/145661/8 "2018-09-20T07:40:22Z")

</div>

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