# Index queue gets full after starting using parent/child

**URL:** <https://discuss.elastic.co/t/index-queue-gets-full-after-starting-using-parent-child/107649>\
**Category:** Elasticsearch\
**Created:** [November 15, 2017, 2:55am UTC](https://discuss.elastic.co/t/index-queue-gets-full-after-starting-using-parent-child/107649 "2017-11-15T02:55:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![toka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toka/32/15773_2.png) [@toka](https://discuss.elastic.co/u/toka)\
**Post date:** [November 15, 2017, 2:55am UTC](https://discuss.elastic.co/t/index-queue-gets-full-after-starting-using-parent-child/107649/1 "2017-11-15T02:55:00Z")

</div>

Hello,

We started using parent/child to filter users in our app, this means a lot of children are created per user (depending on the case, thousands).

Since we started using it we are getting the next error:

> [es\_rejected\_execution\_exception] rejected execution of org.elasticsearch.transport.TcpTransport$RequestHandler@376b8dd0 on EsThreadPoolExecutor[index, queue capacity = 400, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@5549c39[Running, pool size = 8, active threads = 8, queued tasks = 400, completed tasks = 315780]]

At the beginning it didn't happen many times, but as long as days passes (and number of documents grow) we are getting this error more and more often.

By default the queue is 200, so tried to extend it to 400 but it didn't help. I think the problem is in another place, so maybe extending the queue too much is not a good idea.

Checking metrics everything looks good, excepting the refresh ratio ( `refresh.total_time` / `refresh.total` ), which has been growing at the same pace that the errors.

We also realized that the errors are not coming in a constant rate, but in waves, every X minutes.

Elasticsearch Version: 5.6.0

Any thoughts? Thanks.

---

<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:** [November 15, 2017, 5:19am UTC](https://discuss.elastic.co/t/index-queue-gets-full-after-starting-using-parent-child/107649/2 "2017-11-15T05:19:55Z")

</div>

Are you using X-Pack Monitoring to see what the cluster is doing, and if not, then you should 🙂

Basically, your cluster is overloaded and you need to find out why and where. And the stats it delivers will be useful.

---

<div class="post-metadata">

**Author:** ![toka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toka/32/15773_2.png) [@toka](https://discuss.elastic.co/u/toka)\
**Post date:** [November 15, 2017, 3:56pm UTC](https://discuss.elastic.co/t/index-queue-gets-full-after-starting-using-parent-child/107649/3 "2017-11-15T15:56:43Z")

</div>

Thanks for the answer.

> [@warkolm](#):
>
> your cluster is overloaded and you need to find out why and where

Yes, that is what I'm trying to find out 😕

Didn't use X-Pack yet, I'll give it a try.

---

<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:** [December 13, 2017, 3:57pm UTC](https://discuss.elastic.co/t/index-queue-gets-full-after-starting-using-parent-child/107649/4 "2017-12-13T15:57:02Z")

</div>

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