# Too many open threads causes other processes to crash

**URL:** <https://discuss.elastic.co/t/too-many-open-threads-causes-other-processes-to-crash/69157>\
**Category:** Logstash\
**Created:** [December 15, 2016, 11:12am UTC](https://discuss.elastic.co/t/too-many-open-threads-causes-other-processes-to-crash/69157 "2016-12-15T11:12:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcsaba2](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@gcsaba2](https://discuss.elastic.co/u/gcsaba2)\
**Post date:** [December 15, 2016, 11:12am UTC](https://discuss.elastic.co/t/too-many-open-threads-causes-other-processes-to-crash/69157/1 "2016-12-15T11:12:04Z")

</div>

Hello,

We had an issue where logstash opened over 5000 threads. As a consequence, the OS didn't let other processes start on the machine and we had to kill the logstash process.

I'm guessing that logstash had one thread open per file. Most of the files are old and aren't getting updated, and since we are "tail'ing" them I'm guessing it makes no sense to have a thread watch over them.

Is there something we can do to optimize logstash to work with less threads?

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:** [December 19, 2016, 1:20am UTC](https://discuss.elastic.co/t/too-many-open-threads-causes-other-processes-to-crash/69157/2 "2016-12-19T01:20:13Z")

</div>

There's [https://www.elastic.co/guide/en/logstash/5.1/plugins-inputs-file.html#plugins-inputs-file-max\_open\_files](https://www.elastic.co/guide/en/logstash/5.1/plugins-inputs-file.html#plugins-inputs-file-max_open_files) and [https://www.elastic.co/guide/en/logstash/5.1/plugins-inputs-file.html#plugins-inputs-file-ignore\_older](https://www.elastic.co/guide/en/logstash/5.1/plugins-inputs-file.html#plugins-inputs-file-ignore_older)

---

<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:** [January 16, 2017, 1:20am UTC](https://discuss.elastic.co/t/too-many-open-threads-causes-other-processes-to-crash/69157/3 "2017-01-16T01:20:21Z")

</div>

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