# Elastic search Q'ing issue

**URL:** <https://discuss.elastic.co/t/elastic-search-qing-issue/113050>\
**Category:** Elasticsearch\
**Created:** [December 22, 2017, 7:34pm UTC](https://discuss.elastic.co/t/elastic-search-qing-issue/113050 "2017-12-22T19:34:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![melvilgit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/melvilgit/32/37233_2.png) [@melvilgit](https://discuss.elastic.co/u/melvilgit)\
**Post date:** [December 22, 2017, 7:34pm UTC](https://discuss.elastic.co/t/elastic-search-qing-issue/113050/1 "2017-12-22T19:34:47Z")

</div>

I have a kafka consumer that reads from broker and send it to ElasticSearch.The QPS is pretty high.  
My consumer is in Node.js and it asynchronously post to Elasticsearch for all events incoming.

Getting this error while trying to post to ES.

{"error":{"root\_cause":[{"type":"es\_rejected\_execution\_exception","reason":"rejected execution of org.elasticsearch.transport.TransportService$7@7a32e3a3 on EsThreadPoolExecutor[bulk, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@232df9ef[Running, pool size = 4, active threads = 4, queued tasks = 258, completed tasks = 12838]]"}],"type":"es\_rejected\_execution\_exception","reason":"rejected execution of org.elasticsearch.transport.TransportService$7@7a32e3a3 on EsThreadPoolExecutor[bulk, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@232df9ef[Running, pool size = 4, active threads = 4, queued tasks = 258, completed tasks = 12838]]"},"status":429} null 10.117.24.229

Googled the above and learn about Elasticsearch thread pool and Q size and tried changing configs.  
Could you guide on what to do next ?

---

<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 23, 2017, 7:22am UTC](https://discuss.elastic.co/t/elastic-search-qing-issue/113050/2 "2017-12-23T07:22:59Z")

</div>

The best bet is to make sure you are using `_bulk` and if you are, add more nodes to your cluster, as it over overloaded.

---

<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:** [December 23, 2017, 8:05am UTC](https://discuss.elastic.co/t/elastic-search-qing-issue/113050/3 "2017-12-23T08:05:50Z")

</div>

Using bulk requests as mark suggests is a great idea to improve performance and get better throughput. Also read [this blog post on the topic](https://www.elastic.co/blog/why-am-i-seeing-bulk-rejections-in-my-elasticsearch-cluster).

---

<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 20, 2018, 8:06am UTC](https://discuss.elastic.co/t/elastic-search-qing-issue/113050/4 "2018-01-20T08:06:00Z")

</div>

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