# Remove Elasticsearch Timer Daemon Threads

**URL:** <https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998>\
**Category:** Elasticsearch\
**Created:** [April 13, 2018, 2:33pm UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998 "2018-04-13T14:33:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![neel\_patel](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@neel\_patel](https://discuss.elastic.co/u/neel_patel)\
**Post date:** [April 13, 2018, 2:33pm UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/1 "2018-04-13T14:33:20Z")

</div>

Hi  
While doing bulk request to elasticsearch ,we are observing to many daemon thread. Which are Elasticsearch Timer daemon thread.

How we can stop or kill these and free the memory?

For every bulk request it generating a single daemon thread.

---

<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 13, 2018, 2:55pm UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/2 "2018-04-13T14:55:55Z")

</div>

What problem you are trying to solve in fact?

---

<div class="post-metadata">

**Author:** ![neel\_patel](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@neel\_patel](https://discuss.elastic.co/u/neel_patel)\
**Post date:** [April 14, 2018, 5:11pm UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/3 "2018-04-14T17:11:45Z")

</div>

Because of these threads, out of memory error is coming.  
So I want to free the memory.And also when these daemon thread is created there must be some way to stop them

---

<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 14, 2018, 6:44pm UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/4 "2018-04-14T18:44:40Z")

</div>

You have a memory issue may be but that's not probably the way to solve it.  
Better to understand what configuration you have, what you are doing with the cluster...

---

<div class="post-metadata">

**Author:** ![neel\_patel](https://avatars.discourse-cdn.com/v4/letter/n/dc4da7/32.png) [@neel\_patel](https://discuss.elastic.co/u/neel_patel)\
**Post date:** [April 16, 2018, 6:04am UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/5 "2018-04-16T06:04:11Z")

</div>

Hi,

I am getting following error

java.lang.OutOfMemoryError: unable to create new native thread  
11:15:43 at java.lang.Thread.start0(Native Method)  
11:15:43 at java.lang.Thread.start(Thread.java:717)  
11:15:43 at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)  
11:15:43 at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1018)  
11:15:43 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)  
11:15:43 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
11:15:43 at java.lang.Thread.run(Thread.java:748)

And while monitoring there are 1800+ daemon threads,

So I am thinking that is somehow I can remove these thread to solve this error.

---

<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 16, 2018, 6:29am UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/6 "2018-04-16T06:29:54Z")

</div>

that's not probably the way to solve it.  
Better to understand what configuration you have, what you are doing with the cluster...

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [April 16, 2018, 12:14pm UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/7 "2018-04-16T12:14:36Z")

</div>

What version of Elasticsearch? How are you observing these threads? How are you counting threads? Can you provide a list of all threads and their names in your Elasticsearch process (use jstack)?

---

<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:** [May 14, 2018, 12:14pm UTC](https://discuss.elastic.co/t/remove-elasticsearch-timer-daemon-threads/127998/8 "2018-05-14T12:14:41Z")

</div>

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