# Best practice for thread pool queue size

**URL:** <https://discuss.elastic.co/t/best-practice-for-thread-pool-queue-size/20226>\
**Category:** Elasticsearch\
**Created:** [October 13, 2014, 9:16pm UTC](https://discuss.elastic.co/t/best-practice-for-thread-pool-queue-size/20226 "2014-10-13T21:16:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaki\_Agha](https://avatars.discourse-cdn.com/v4/letter/z/fbc32d/32.png) [@Zaki\_Agha](https://discuss.elastic.co/u/Zaki_Agha)\
**Post date:** [October 13, 2014, 9:16pm UTC](https://discuss.elastic.co/t/best-practice-for-thread-pool-queue-size/20226/1 "2014-10-13T21:16:22Z")

</div>

Hi  
We have several elastic search clusters  
Recently we faced an issue in which one of our nodes experienced queueing.  
In fact, the queue length was greater than 1000.  
Subsequent requests were rejected as the queue was full.

Should we increase the default queue size?

I understand that there are several queue's within elastic search.

1. 

Queues in Elastic Search  
1.

```
  Index 
  <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html#modules-threadpool> - 
  default 200
  2. 
  
  Bulk - default 50
  3. 
  
  Get - default 1000
  4. 
  
  Search - default 1000
  5. 
  
  Suggest - default 1000
  6. 
  
  Percolate - default 1000
  7. 
  
  ThreadPool queue_size 
  <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html#_literal_fixed_literal>: 
   1000

```

Errors:

1. 

Error # 1

[[LApp45][SiyuJOHVRRG1udLiFwM9Yw][es1][inet[/xxx.xxx.xxx.xxx:9300]]], id  
[84124759]

[2014-07-13 04:13:35,332][WARN][transport]

[es2] Received response for a request that has timed out,

sent [55372ms] ago,

timed out [25372ms] ago,

action [discovery/zen/fd/ping],

node

[2014-07-13 04:13:35,332][WARN][transport]

[es2] Received response for a request that has timed out,

sent [55372ms] ago,

timed out [25372ms] ago,

action [discovery/zen/fd/ping],

node

[[LApp37][FKVv20F4RSiEsxJ4Bo8rMA][es3][inet[/xxx.xxx.xxx.xxx:9300]]], id  
[80874233]

1. 

Error # 2

[2014-07-13 06:28:26,043][WARN]

[transport]

[es2] Received response for a request that has timed out,

sent [55795ms] ago,

timed out [25795ms] ago,

action [discovery/zen/fd/ping],

node

1. 

Error # 3

[2014-07-13 06:28:26,049][WARN][transport]

[es2] Received response for a request that has timed out,

sent [56023ms] ago,

timed out [26023ms] ago,

action [discovery/zen/fd/ping],

node [[es3][FKVv20F4RSiEsxJ4Bo8rMA][es3][inet[/xxx.xxx.xxx.xxx:9300]]], id  
[84124758]

1. 

Error # 4

There are several errors of this type all for the same index  
aggregated\_user\_game\_points

[2014-07-13 06:28:26,153][DEBUG][action.search.type]

[es2] [aggregated\_user\_game\_points][3], node[8qI5LGo2TxG1S-mQUgEA\_w], [P], s

[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3367563e]  
lastShard [true]

org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected  
execution (queue capacity 1000) on

org.elasticsearch.action.search  
.type.TransportSearchTypeAction$BaseAsyncAction$4@71bd1bf

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [October 13, 2014, 10:21pm UTC](https://discuss.elastic.co/t/best-practice-for-thread-pool-queue-size/20226/2 "2014-10-13T22:21:02Z")

</div>

Increasing queues isn't going to help if there are underlying problems  
stopping the processing.

Based on those errors it looks like you may have network issues, but they  
are from July?

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 14 October 2014 08:16, Zaki Agha [zaki@roblox.com](mailto:zaki@roblox.com) wrote:

> Hi  
> We have several Elasticsearch clusters  
> Recently we faced an issue in which one of our nodes experienced queueing.  
> In fact, the queue length was greater than 1000.  
> Subsequent requests were rejected as the queue was full.
> 
> Should we increase the default queue size?
> 
> I understand that there are several queue's within Elasticsearch.
> 
> 1. 
> 
> Queues in Elastic Search  
> 1.
> 
> ```
> Index
> <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html#modules-threadpool> -
> default 200
> 2.
> 
> Bulk - default 50
> 3.
> 
> Get - default 1000
> 4.
> 
> Search - default 1000
> 5.
> 
> Suggest - default 1000
> 6.
> 
> Percolate - default 1000
> 7.
> 
> ThreadPool queue_size
> <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html#_literal_fixed_literal>:
> 1000
> 
> ```
> 
> Errors:
> 
> 1. 
> 
> Error # 1
> 
> [[LApp45][SiyuJOHVRRG1udLiFwM9Yw][es1][inet[/xxx.xxx.xxx.xxx:9300]]], id  
> [84124759]
> 
> [2014-07-13 04:13:35,332][WARN][transport]
> 
> [es2] Received response for a request that has timed out,
> 
> sent [55372ms] ago,
> 
> timed out [25372ms] ago,
> 
> action [discovery/zen/fd/ping],
> 
> node
> 
> [2014-07-13 04:13:35,332][WARN][transport]
> 
> [es2] Received response for a request that has timed out,
> 
> sent [55372ms] ago,
> 
> timed out [25372ms] ago,
> 
> action [discovery/zen/fd/ping],
> 
> node
> 
> [[LApp37][FKVv20F4RSiEsxJ4Bo8rMA][es3][inet[/xxx.xxx.xxx.xxx:9300]]], id  
> [80874233]
> 
> 1. 
> 
> Error # 2
> 
> [2014-07-13 06:28:26,043][WARN]
> 
> [transport]
> 
> [es2] Received response for a request that has timed out,
> 
> sent [55795ms] ago,
> 
> timed out [25795ms] ago,
> 
> action [discovery/zen/fd/ping],
> 
> node
> 
> 1. 
> 
> Error # 3
> 
> [2014-07-13 06:28:26,049][WARN][transport]
> 
> [es2] Received response for a request that has timed out,
> 
> sent [56023ms] ago,
> 
> timed out [26023ms] ago,
> 
> action [discovery/zen/fd/ping],
> 
> node [[es3][FKVv20F4RSiEsxJ4Bo8rMA][es3][inet[/xxx.xxx.xxx.xxx:9300]]],  
> id [84124758]
> 
> 1. 
> 
> Error # 4
> 
> There are several errors of this type all for the same index  
> aggregated\_user\_game\_points
> 
> [2014-07-13 06:28:26,153][DEBUG][action.search.type]
> 
> [es2] [aggregated\_user\_game\_points][3], node[8qI5LGo2TxG1S-mQUgEA\_w],  
> [P], s
> 
> [STARTED]: Failed to execute [org.elasticsearch.action.search  
> .SearchRequest@3367563e] lastShard [true]
> 
> org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected  
> execution (queue capacity 1000) on
> 
> org.elasticsearch.action.search  
> .type.TransportSearchTypeAction$BaseAsyncAction$4@71bd1bf
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624YdD2vWb-aPj2ySqR%2B%3D8K0fH7NTFjHjF426Gvcmj4mKUA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624YdD2vWb-aPj2ySqR%2B%3D8K0fH7NTFjHjF426Gvcmj4mKUA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Zaki\_Agha](https://avatars.discourse-cdn.com/v4/letter/z/fbc32d/32.png) [@Zaki\_Agha](https://discuss.elastic.co/u/Zaki_Agha)\
**Post date:** [October 17, 2014, 11:51pm UTC](https://discuss.elastic.co/t/best-practice-for-thread-pool-queue-size/20226/3 "2014-10-17T23:51:45Z")

</div>

Yes the particular error is from July.  
How can I determine the optimal setting for queue size?

On Monday, October 13, 2014 3:21:32 PM UTC-7, Mark Walkom wrote:

> Increasing queues isn't going to help if there are underlying problems  
> stopping the processing.
> 
> Based on those errors it looks like you may have network issues, but they  
> are from July?
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 14 October 2014 08:16, Zaki Agha \<[za...@roblox.com](mailto:za...@roblox.com) \<javascript:\>\>  
> wrote:
> 
> > Hi  
> > We have several Elasticsearch clusters  
> > Recently we faced an issue in which one of our nodes experienced queueing.  
> > In fact, the queue length was greater than 1000.  
> > Subsequent requests were rejected as the queue was full.
> > 
> > Should we increase the default queue size?
> > 
> > I understand that there are several queue's within Elasticsearch.
> > 
> > 1. 
> > 
> > Queues in Elastic Search  
> > 1.
> > 
> > ```
> > Index 
> > <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html#modules-threadpool> - 
> > default 200
> > 2. 
> >   
> > Bulk - default 50
> > 3. 
> >   
> > Get - default 1000
> > 4. 
> >   
> > Search - default 1000
> > 5. 
> >   
> > Suggest - default 1000
> > 6. 
> >   
> > Percolate - default 1000
> > 7. 
> >   
> > ThreadPool queue_size 
> > <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html#_literal_fixed_literal>: 
> > 1000
> > 
> > ```
> > 
> > Errors:
> > 
> > 1. 
> > 
> > Error # 1
> > 
> > [[LApp45][SiyuJOHVRRG1udLiFwM9Yw][es1][inet[/xxx.xxx.xxx.xxx:9300]]], id  
> > [84124759]
> > 
> > [2014-07-13 04:13:35,332][WARN][transport]
> > 
> > [es2] Received response for a request that has timed out,
> > 
> > sent [55372ms] ago,
> > 
> > timed out [25372ms] ago,
> > 
> > action [discovery/zen/fd/ping],
> > 
> > node
> > 
> > [2014-07-13 04:13:35,332][WARN][transport]
> > 
> > [es2] Received response for a request that has timed out,
> > 
> > sent [55372ms] ago,
> > 
> > timed out [25372ms] ago,
> > 
> > action [discovery/zen/fd/ping],
> > 
> > node
> > 
> > [[LApp37][FKVv20F4RSiEsxJ4Bo8rMA][es3][inet[/xxx.xxx.xxx.xxx:9300]]], id  
> > [80874233]
> > 
> > 1. 
> > 
> > Error # 2
> > 
> > [2014-07-13 06:28:26,043][WARN]
> > 
> > [transport]
> > 
> > [es2] Received response for a request that has timed out,
> > 
> > sent [55795ms] ago,
> > 
> > timed out [25795ms] ago,
> > 
> > action [discovery/zen/fd/ping],
> > 
> > node
> > 
> > 1. 
> > 
> > Error # 3
> > 
> > [2014-07-13 06:28:26,049][WARN][transport]
> > 
> > [es2] Received response for a request that has timed out,
> > 
> > sent [56023ms] ago,
> > 
> > timed out [26023ms] ago,
> > 
> > action [discovery/zen/fd/ping],
> > 
> > node [[es3][FKVv20F4RSiEsxJ4Bo8rMA][es3][inet[/xxx.xxx.xxx.xxx:9300]]],  
> > id [84124758]
> > 
> > 1. 
> > 
> > Error # 4
> > 
> > There are several errors of this type all for the same index  
> > aggregated\_user\_game\_points
> > 
> > [2014-07-13 06:28:26,153][DEBUG][action.search.type]
> > 
> > [es2] [aggregated\_user\_game\_points][3], node[8qI5LGo2TxG1S-mQUgEA\_w],  
> > [P], s
> > 
> > [STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@3367563e]  
> > lastShard [true]
> > 
> > org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected  
> > execution (queue capacity 1000) on
> > 
> > org.elasticsearch.action.search  
> > .type.TransportSearchTypeAction$BaseAsyncAction$4@71bd1bf
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9cc3b7a1-2b2c-4eec-b3e2-85593b021123%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/12e46524-3f8f-4a1e-90d7-5ae4f4c3a191%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/12e46524-3f8f-4a1e-90d7-5ae4f4c3a191%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:55am UTC](https://discuss.elastic.co/t/best-practice-for-thread-pool-queue-size/20226/4 "2017-07-06T00:55:21Z")

</div>


