# Logstash JVM Heap Errors (Not Allocating to Xms)

**URL:** <https://discuss.elastic.co/t/logstash-jvm-heap-errors-not-allocating-to-xms/263270>\
**Category:** Logstash\
**Created:** [February 4, 2021, 4:57pm UTC](https://discuss.elastic.co/t/logstash-jvm-heap-errors-not-allocating-to-xms/263270 "2021-02-04T16:57:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![randyitguy](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@randyitguy](https://discuss.elastic.co/u/randyitguy)\
**Post date:** [February 4, 2021, 4:57pm UTC](https://discuss.elastic.co/t/logstash-jvm-heap-errors-not-allocating-to-xms/263270/1 "2021-02-04T16:57:00Z")

</div>

I'm using logstash `7.10`. I have 3 pipelines with 3 different input sources. Two out of the three stop producing output after a short number of documents. One of them runs fine. If I try to run logstash with all 3 specified in the pipelines.yml file, logstash eventually errors out with `Logstash - java.lang.OutOfMemoryError: Java heap space`. I have both `Xms` and `Xmx` in `/etc/logstash/jvm.options` set to half of my ram (4g), but I am only seeing my system using 1g of ram.

This is first bit of the cmdline shown with `ps` shows the `Xms` and `Xmx` values are set correctly:

```auto
root 2341 11.3 11.4 6957772 934508 pts/0 Sl+ 09:26 1:39 /usr/share/logstash/jdk/bin/java -Xms4g -Xmx4g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.compile.invokedynamic=true -Djruby.jit.threshold=0 -Djruby.regexp.interruptible=true -XX:+HeapDumpOnOutOfMemoryError

```

---

<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:** [March 4, 2021, 4:57pm UTC](https://discuss.elastic.co/t/logstash-jvm-heap-errors-not-allocating-to-xms/263270/2 "2021-03-04T16:57:07Z")

</div>

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