# LS\_HEAP\_SIZE broken with logstash 5.0.0?

**URL:** <https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980>\
**Category:** Logstash\
**Created:** [November 14, 2016, 1:13pm UTC](https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980 "2016-11-14T13:13:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cg-max](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@cg-max](https://discuss.elastic.co/u/cg-max)\
**Post date:** [November 14, 2016, 1:13pm UTC](https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980/1 "2016-11-14T13:13:34Z")

</div>

Hi,

With logstash 5.0.0 on centos 7.2 using the elastic rpm, our logstash runs like this:  
usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=$HOME -XX:HeapDumpPath=/dev/null -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 --1.9 /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash  
[root@zd020 logstash]#

I want to increase the heapsize to 4g, so I set LS\_HEAP\_SIZE=4g in /etc/sysconfig/logstash then ran $LS\_HOME/bin/system-install followed by a restart of logstash. But -Xmx stayed at 1g, in other words the setting was not applied. I tried the same thing by adding LS\_HEAP\_SIZE to /etc/logstash/startup.options but the result was the same. I verified using visualVM that indeed the heapsize is still limited to 1g.  
I did a grep for LS\_HEAP\_SIZE IN $LS\_HOME/bin but the only script that seems to use that setting is a dos/windows batch script.

Perhaps the documentation is not correct in this area? How should I increase the heap that logstash 5 is allowed to use ?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 14, 2016, 3:49pm UTC](https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980/2 "2016-11-14T15:49:19Z")

</div>

Logstash 5.0 does not use `/etc/sysconfig/logsgtash`. It uses [`/etc/logstash/jvm.options`](https://www.elastic.co/guide/en/logstash/5.0/config-setting-files.html), mirroring how Elasticsearch 5.0 handles jvm settings. This change is especially important as it allows the JVM locale to be set easily.

Try putting your heap settings in there.

---

<div class="post-metadata">

**Author:** ![cg-max](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@cg-max](https://discuss.elastic.co/u/cg-max)\
**Post date:** [November 14, 2016, 4:33pm UTC](https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980/3 "2016-11-14T16:33:45Z")

</div>

indeed that does work (although not with ls\_heap\_size). It seems the documentation for logstash 5 is not correct since it still refers to ls\_heap\_size in many places.

thanks for the pointer.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [November 15, 2016, 12:58pm UTC](https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980/4 "2016-11-15T12:58:21Z")

</div>

Please share any links that point to `/etc/sysconfig/logstash` and/or `LS_HEAP_SIZE` (which is still usable, if launching exclusively from the command-line.

---

<div class="post-metadata">

**Author:** ![cg-max](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@cg-max](https://discuss.elastic.co/u/cg-max)\
**Post date:** [November 15, 2016, 1:33pm UTC](https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980/5 "2016-11-15T13:33:20Z")

</div>

I think this is all of them: [https://www.elastic.co/search?q="ls\_heap\_size"&section=Docs%2FLogstash%2FReference%2F5.0](https://www.elastic.co/search?q=%22ls_heap_size%22&section=Docs%2FLogstash%2FReference%2F5.0)

---

<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:** [December 13, 2016, 1:33pm UTC](https://discuss.elastic.co/t/ls-heap-size-broken-with-logstash-5-0-0/65980/6 "2016-12-13T13:33:19Z")

</div>

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