# Changing Logstash Configuration to solve OutofMemoryError

**URL:** <https://discuss.elastic.co/t/changing-logstash-configuration-to-solve-outofmemoryerror/130662>\
**Category:** Logstash\
**Created:** [May 4, 2018, 4:24pm UTC](https://discuss.elastic.co/t/changing-logstash-configuration-to-solve-outofmemoryerror/130662 "2018-05-04T16:24:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpazhyannur](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@rpazhyannur](https://discuss.elastic.co/u/rpazhyannur)\
**Post date:** [May 4, 2018, 4:24pm UTC](https://discuss.elastic.co/t/changing-logstash-configuration-to-solve-outofmemoryerror/130662/1 "2018-05-04T16:24:04Z")

</div>

Hello..

I get the following logstash error

Specify -J-Xmx####m to increase it (#### = cap size in MB).  
Specify -w for full OutOfMemoryError stack trace"

I am not sure which configuration file I should change.  
Currently, I run logstash using  
systemctl start logstash

I am running on Centos and I can't locate logstash.yml or jvm.options.

thanks in advance for your help

best

Rajesh

---

<div class="post-metadata">

**Author:** ![rpazhyannur](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@rpazhyannur](https://discuss.elastic.co/u/rpazhyannur)\
**Post date:** [May 4, 2018, 5:06pm UTC](https://discuss.elastic.co/t/changing-logstash-configuration-to-solve-outofmemoryerror/130662/2 "2018-05-04T17:06:33Z")

</div>

Looks like the config was in

/etc/sysconfig/logstash.

# Arguments to pass to java

LS\_HEAP\_SIZE="2g"  
#LS\_JAVA\_OPTS="-Djava.io.tmpdir=$HOME"

---

<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:** [June 1, 2018, 5:06pm UTC](https://discuss.elastic.co/t/changing-logstash-configuration-to-solve-outofmemoryerror/130662/3 "2018-06-01T17:06:37Z")

</div>

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