# Reached open files limit when running as service

**URL:** <https://discuss.elastic.co/t/reached-open-files-limit-when-running-as-service/96329>\
**Category:** Logstash\
**Created:** [August 8, 2017, 7:14pm UTC](https://discuss.elastic.co/t/reached-open-files-limit-when-running-as-service/96329 "2017-08-08T19:14:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niraj\_kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_kumar/32/4130_2.png) [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Post date:** [August 8, 2017, 7:14pm UTC](https://discuss.elastic.co/t/reached-open-files-limit-when-running-as-service/96329/1 "2017-08-08T19:14:57Z")

</div>

I am not understanding something that when i run logstash from command line from logstash user itself it works perfectly fine and i see data being ingested.

`/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --debug`

But when when i run logstash from my user which is an administrator user on the system the log spills with the following message and goes on and on and nothing happens. Why is this happening.? Logstash service is indeed running as logstash user so that be basically the same thing.

`logstash 6881 1 15 11:56 ? 00:01:33 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Xms256m -Xss2048k -Djffi.boot.library.path=/usr/share/logstash/vendor/jruby/lib/jni -Xbootclasspath/a:/usr/share/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/usr/share/logstash/vendor/jruby -Djruby.lib=/usr/share/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash`

```
[2017-08-08T12:00:38,226][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:01:00,014][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:01:21,738][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:01:42,430][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:02:03,157][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:02:24,881][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:02:45,577][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:03:06,043][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:03:27,403][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:03:48,757][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:04:09,080][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:04:30,459][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:04:51,091][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:05:12,824][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:05:33,483][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:05:54,928][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:06:15,624][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:06:36,336][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33
[2017-08-08T12:06:57,112][WARN][logstash.inputs.file] Reached open files limit: 1024, set by the 'max_open_files' option or default, files yet to open: 33

```

How can i fix this. Just keep increasing max\_open\_files settings in my config.

LS Version:- 5.5

--  
Niraj

---

<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:** [September 5, 2017, 7:15pm UTC](https://discuss.elastic.co/t/reached-open-files-limit-when-running-as-service/96329/2 "2017-09-05T19:15:17Z")

</div>

Closed on September 5, 2017, 7:15pm UTC

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