# Unable to set heap size via LS\_HEAP\_SIZE on logstash 5.1.1

**URL:** <https://discuss.elastic.co/t/unable-to-set-heap-size-via-ls-heap-size-on-logstash-5-1-1/71085>\
**Category:** Logstash\
**Created:** [January 10, 2017, 1:03pm UTC](https://discuss.elastic.co/t/unable-to-set-heap-size-via-ls-heap-size-on-logstash-5-1-1/71085 "2017-01-10T13:03:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 12, 2017, 6:13pm UTC](https://discuss.elastic.co/t/unable-to-set-heap-size-via-ls-heap-size-on-logstash-5-1-1/71085/2 "2017-01-12T18:13:28Z")

</div>

> together with --allow-env option

`--allow-env` has nothing to do with the JVM options.

> I am able to change the heap by editing config/jvm.options file, but this has the inconvenience that the value contained in that file is used for each started instance.

Perhaps this thread is useful:

> [@Setting jvm.options with multiple logstash (5.x) instances on the same box](https://discuss.elastic.co/t/setting-jvm-options-with-multiple-logstash-5-x-instances-on-the-same-box/67765):
>
> Hi all, we recently started looking into deploying multiple instances of logstash on the same box and noticed that when the logstash settings directory is changed from the default (/etc/logstash), the jvm.options file is no longer read. For example in our current setup we have: /etc/logstash/instance1/(logstash.yml, jvm.options etc) /etc/logstash/instance2/(logstash.yml, jvm.options etc) and jvm.options is not detected. If we move jvm.options back in /etc/logstash/ then it's read as normal…

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-set-heap-size-via-ls-heap-size-on-logstash-5-1-1/71085)._
