# Elasticsearch thread\_pool is growing over and over

**URL:** https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078
**Category:** Elasticsearch
**Created:** [March 3, 2021, 9:44am UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078 "2021-03-03T09:44:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![nuzolx](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nuzolx](https://discuss.elastic.co/u/nuzolx)
#### Post date: [March 3, 2021, 9:44am UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078/1 "2021-03-03T09:44:41Z")

</div>

Hi all,

I am a newbie with Elastic. I cannot find all my documents in my research. If I repeat the same search, after a while, it's okay. I understood that it could come from the 'refresh'. But sometimes the waiting time is really long. I have found that the 'thread\_pool' is getting bigger and bigger. I do not know if it's normal..

> <https://gist.github.com/nuzolx/e9b60dc46629d8e7ae0028232a3c9792>

Any ideas? Please

Version 7.8.0 on Windows Server 2019.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 3, 2021, 10:05am UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078/2 "2021-03-03T10:05:58Z")

</div>

Refresh is happening behind the scene "when it's needed".

Could you explain a bit more about the context? Is that for integration testing? Is that in production?  
What is the problem of "waiting a bit" for your use case?

---

<div class="post-metadata">

### Author: ![nuzolx](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nuzolx](https://discuss.elastic.co/u/nuzolx)
#### Post date: [March 3, 2021, 10:33am UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078/3 "2021-03-03T10:33:40Z")

</div>

It's in a production context.

I will try to explain my use case.  
I index documents on the fly, 10K per day, mostly on working hours. Indexing, one by one not in batch.  
Also, I search the index before indexing the document. So the refresh is normally triggered regularly.  
Maybe an hour after indexing one, I'm looking for it (this one in particular) for the first time and sometimes I can't find it.  
All this with the Nest client (in netcore).  
If after that, I redo the same request directly with REST and the document is found.

This is why I am talking about refresh and why I am wondering about the queue.

---

<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: [March 31, 2021, 10:33am UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078/4 "2021-03-31T10:33:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 2, 2021, 1:37pm UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078/5 "2021-04-02T13:37:32Z")

</div>



---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 2, 2021, 1:39pm UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078/6 "2021-04-02T13:39:17Z")

</div>

> [@nuzolx](#):
>
> Maybe an hour after indexing one, I'm looking for it (this one in particular) for the first time and sometimes I can't find it.

It should not really happen, after one hour.  
In case it helps, you can trigger manually a refresh just before running your search. See [Refresh API | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html)

---

<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: [November 4, 2022, 8:25am UTC](https://discuss.elastic.co/t/elasticsearch-thread-pool-is-growing-over-and-over/266078/7 "2022-11-04T08:25:34Z")

</div>


