# Manage Thread Pool in Elasticsearch

**URL:** https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493
**Category:** Elasticsearch
**Tags:** language-clients
**Created:** [December 20, 2021, 5:24pm UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493 "2021-12-20T17:24:41Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![yash\_196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yash_196/32/99273_2.png) [@yash\_196](https://discuss.elastic.co/u/yash_196)
#### Post date: [December 20, 2021, 5:24pm UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/1 "2021-12-20T17:24:42Z")

</div>

Hi Team,

Is there any way to increase the queue size for write and search using JAVA API's / High Level Rest Client?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [December 20, 2021, 6:17pm UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/2 "2021-12-20T18:17:21Z")

</div>

No, these settings require a node restart to change. But changing them is almost certainly a mistake.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 21, 2021, 4:02am UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/3 "2021-12-21T04:02:54Z")

</div>

Can you elaborate more on what problem you are trying to solve here?

---

<div class="post-metadata">

### Author: ![yash\_196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yash_196/32/99273_2.png) [@yash\_196](https://discuss.elastic.co/u/yash_196)
#### Post date: [December 21, 2021, 9:11am UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/4 "2021-12-21T09:11:30Z")

</div>

So, i am trying to increase a write/search thread pool queue size in runtime, in case there are a lot of requests and the queue is filled up.

---

<div class="post-metadata">

### Author: ![yash\_196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yash_196/32/99273_2.png) [@yash\_196](https://discuss.elastic.co/u/yash_196)
#### Post date: [December 21, 2021, 9:16am UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/5 "2021-12-21T09:16:03Z")

</div>

@DavidTurner is there any way to increase the queue size without restart? If not, while restarting is the queue still available for consuming / pushing data?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 21, 2021, 9:16am UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/6 "2021-12-21T09:16:21Z")

</div>

> [@yash\_196](#):
>
> is there any way to increase the queue size without restart

Nope.

> [@yash\_196](#):
>
> while restarting is the queue still available for consuming / pushing data?

Nope.

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [December 21, 2021, 10:22am UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/7 "2021-12-21T10:22:48Z")

</div>

> [@yash\_196](#):
>
> So, i am trying to increase a write/search thread pool queue size in runtime, in case there are a lot of requests and the queue is filled up.

You _want_ the queue to fill up and reject requests if Elasticsearch is overloaded because this lets you react quicker to the overload. If you make the queue bigger then tasks will just sit in the queue for longer and your response times will suffer. If the overload is a short spike then client retries will deal with it; if the overload is sustained then the queue will still fill up no matter how big it is.

---

<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: [January 18, 2022, 10:23am UTC](https://discuss.elastic.co/t/manage-thread-pool-in-elasticsearch/292493/8 "2022-01-18T10:23:16Z")

</div>

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