# Server keeps creating threads even though using fixed threadpool in config

**URL:** <https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708>\
**Category:** Elasticsearch\
**Created:** [October 27, 2011, 6:04pm UTC](https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708 "2011-10-27T18:04:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavier\_Stevens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavier_stevens/32/3089_2.png) [@Xavier\_Stevens](https://discuss.elastic.co/u/Xavier_Stevens)\
**Post date:** [October 27, 2011, 6:04pm UTC](https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708/1 "2011-10-27T18:04:38Z")

</div>

We're using ES 0.17.9 and it seems that the server keeps creating more  
and more threads in the index pool. What is the default number of  
fixed threads?

I grabbed this from YourKit which shows that most of them are all  
waiting on a lock in the queue.

[http://xstevens.pastebin.mozilla.org/1365860](http://xstevens.pastebin.mozilla.org/1365860)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 27, 2011, 6:22pm UTC](https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708/2 "2011-10-27T18:22:40Z")

</div>

Can you gist your config of the thread pool? You can set `threadpool` to  
DEBUG in the logging file, and see which threads pools get created, types,  
and sizes.

On Thu, Oct 27, 2011 at 8:04 PM, Xavier [xavier.stevens@gmail.com](mailto:xavier.stevens@gmail.com) wrote:

> We're using ES 0.17.9 and it seems that the server keeps creating more  
> and more threads in the index pool. What is the default number of  
> fixed threads?
> 
> I grabbed this from YourKit which shows that most of them are all  
> waiting on a lock in the queue.
> 
> [http://xstevens.pastebin.mozilla.org/1365860](http://xstevens.pastebin.mozilla.org/1365860)

---

<div class="post-metadata">

**Author:** ![Xavier\_Stevens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavier_stevens/32/3089_2.png) [@Xavier\_Stevens](https://discuss.elastic.co/u/Xavier_Stevens)\
**Post date:** [October 27, 2011, 6:30pm UTC](https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708/3 "2011-10-27T18:30:58Z")

</div>

Here's our config:

[http://xstevens.pastebin.mozilla.org/1365875](http://xstevens.pastebin.mozilla.org/1365875)

We don't specify specific sizes currently.

-Xavier

On Oct 27, 11:22 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Can you gist your config of the thread pool? You can set `threadpool` to  
> DEBUG in the logging file, and see which threads pools get created, types,  
> and sizes.
> 
> On Thu, Oct 27, 2011 at 8:04 PM, Xavier [xavier.stev...@gmail.com](mailto:xavier.stev...@gmail.com) wrote:
> 
> > We're using ES 0.17.9 and it seems that the server keeps creating more  
> > and more threads in the index pool. What is the default number of  
> > fixed threads?
> 
> > I grabbed this from YourKit which shows that most of them are all  
> > waiting on a lock in the queue.
> 
> > [http://xstevens.pastebin.mozilla.org/1365860](http://xstevens.pastebin.mozilla.org/1365860)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 27, 2011, 6:58pm UTC](https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708/4 "2011-10-27T18:58:25Z")

</div>

The default size for a fixed thread pool is the number of available  
processors \* 5. You can see what exact value it uses by changing the logging  
that I mentioned before.

On Thu, Oct 27, 2011 at 8:30 PM, Xavier [xavier.stevens@gmail.com](mailto:xavier.stevens@gmail.com) wrote:

> Here's our config:
> 
> [http://xstevens.pastebin.mozilla.org/1365875](http://xstevens.pastebin.mozilla.org/1365875)
> 
> We don't specify specific sizes currently.
> 
> -Xavier
> 
> On Oct 27, 11:22 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Can you gist your config of the thread pool? You can set `threadpool` to  
> > DEBUG in the logging file, and see which threads pools get created,  
> > types,  
> > and sizes.
> > 
> > On Thu, Oct 27, 2011 at 8:04 PM, Xavier [xavier.stev...@gmail.com](mailto:xavier.stev...@gmail.com)  
> > wrote:
> > 
> > > We're using ES 0.17.9 and it seems that the server keeps creating more  
> > > and more threads in the index pool. What is the default number of  
> > > fixed threads?
> > 
> > > I grabbed this from YourKit which shows that most of them are all  
> > > waiting on a lock in the queue.
> > 
> > > [http://xstevens.pastebin.mozilla.org/1365860](http://xstevens.pastebin.mozilla.org/1365860)

---

<div class="post-metadata">

**Author:** ![Xavier\_Stevens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavier_stevens/32/3089_2.png) [@Xavier\_Stevens](https://discuss.elastic.co/u/Xavier_Stevens)\
**Post date:** [October 27, 2011, 7:21pm UTC](https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708/5 "2011-10-27T19:21:33Z")

</div>

That's makes sense then. Thanks!

On Oct 27, 11:58 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> The default size for a fixed thread pool is the number of available  
> processors \* 5. You can see what exact value it uses by changing the logging  
> that I mentioned before.
> 
> On Thu, Oct 27, 2011 at 8:30 PM, Xavier [xavier.stev...@gmail.com](mailto:xavier.stev...@gmail.com) wrote:
> 
> > Here's our config:
> 
> > [http://xstevens.pastebin.mozilla.org/1365875](http://xstevens.pastebin.mozilla.org/1365875)
> 
> > We don't specify specific sizes currently.
> 
> > -Xavier
> 
> > On Oct 27, 11:22 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> > 
> > > Can you gist your config of the thread pool? You can set `threadpool` to  
> > > DEBUG in the logging file, and see which threads pools get created,  
> > > types,  
> > > and sizes.
> 
> > > On Thu, Oct 27, 2011 at 8:04 PM, Xavier [xavier.stev...@gmail.com](mailto:xavier.stev...@gmail.com)  
> > > wrote:
> > > 
> > > > We're using ES 0.17.9 and it seems that the server keeps creating more  
> > > > and more threads in the index pool. What is the default number of  
> > > > fixed threads?
> 
> > > > I grabbed this from YourKit which shows that most of them are all  
> > > > waiting on a lock in the queue.
> 
> > > > [http://xstevens.pastebin.mozilla.org/1365860](http://xstevens.pastebin.mozilla.org/1365860)

---

<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, 3:50am UTC](https://discuss.elastic.co/t/server-keeps-creating-threads-even-though-using-fixed-threadpool-in-config/5708/6 "2017-07-06T03:50:35Z")

</div>


