# Elasticsearch node stats write threadpool

**URL:** https://discuss.elastic.co/t/elasticsearch-node-stats-write-threadpool/272516
**Category:** Elasticsearch
**Created:** [May 9, 2021, 6:41pm UTC](https://discuss.elastic.co/t/elasticsearch-node-stats-write-threadpool/272516 "2021-05-09T18:41:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Praveen\_Atluri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen_atluri/32/39721_2.png) [@Praveen\_Atluri](https://discuss.elastic.co/u/Praveen_Atluri)
#### Post date: [May 9, 2021, 6:41pm UTC](https://discuss.elastic.co/t/elasticsearch-node-stats-write-threadpool/272516/1 "2021-05-09T18:41:09Z")

</div>

When I checked the node stats for some of my nodes, I see below for write thread pool.

```auto
 "write" : {
          "threads" : 8,
          "queue" : 13,
          "active" : 8,
          "rejected" : 19958,
          "largest" : 8,
          "completed" : 11249210
        }

```

Does this indicate that elasticsearch is unable to cope with the rate of ingestion and rejecting some writes? or is the r bulk api of high level rest client taking care of writing the documents using retry logic? can we increase the size of the write thread pool

---

<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: [May 9, 2021, 6:49pm UTC](https://discuss.elastic.co/t/elasticsearch-node-stats-write-threadpool/272516/2 "2021-05-09T18:49:55Z")

</div>

> [@Praveen\_Atluri](#):
>
> Does this indicate that elasticsearch is unable to cope with the rate of ingestion and rejecting some writes?

It's impossible to say from these stats. Sometimes when a task is rejected from the `write` threadpool the corresponding write operation still succeeds. You will need to check the responses sent back to the client.

> [@Praveen\_Atluri](#):
>
> is the r bulk api of high level rest client taking care of writing the documents using retry logic?

I don't think there's any built-in retry logic if you're using the Bulk API directly, although there is if you use the `BulkProcessor`. Either way it's best to record failures on the client (e.g. with logging) and handle them appropriately for your application.

> [@Praveen\_Atluri](#):
>
> can we increase the size of the write thread pool

That's unlikely to make much difference, there's a risk of rejections no matter how many write threads you have. Client-side failure handling is the most robust approach.

---

<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: [June 6, 2021, 6:49pm UTC](https://discuss.elastic.co/t/elasticsearch-node-stats-write-threadpool/272516/3 "2021-06-06T18:49:58Z")

</div>

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