# Memory issue with logstash?

**URL:** <https://discuss.elastic.co/t/memory-issue-with-logstash/31966>\
**Category:** Logstash\
**Created:** [October 11, 2015, 11:09am UTC](https://discuss.elastic.co/t/memory-issue-with-logstash/31966 "2015-10-11T11:09:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sampasei](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sampasei](https://discuss.elastic.co/u/sampasei)\
**Post date:** [October 11, 2015, 11:09am UTC](https://discuss.elastic.co/t/memory-issue-with-logstash/31966/1 "2015-10-11T11:09:35Z")

</div>

Hi all,  
i've configured logstash in order to take some log files (these files are never updated because are made ony for tests) and write record data on Elastichsearch and Mongo.  
Below the conf file  
`input { file{ path => "/home/test/logs/**/aud*.log" type => "aud" start_position => "beginning" sincedb_path => "/dev/null" } } filter { if [type] == "aud" { csv { separator => " " columns => ["ts", "aud_data", "aud_app"] } } } output { stdout { } elasticsearch { protocol => "http" cluster => "audc01" } mongodb { collection => "%{type}" database => "adsData" uri => "mongodb://127.0.0.1/" } }`  
Mongo and Elastichsearch crushes after short time. If mongodb output is removed, i have these debug messages

```
Shifting current elasticsearch client {:level=>:debug, :file=>"logstash/outputs/elasticsearch.rb", :line=>"572", :method=>"flush"}
Switched current elasticsearch client to #0 at localhost {:level=>:debug, :file=>"logstash/outputs/elasticsearch.rb", :line=>"623", :method=>"shift_client"}

```

After that Elastchsearch seems blocked.  
I'm using logstash 1.5.4 and openjdk 8.  
How can avoid this problem?Any suggestion?  
Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 11, 2015, 9:05pm UTC](https://discuss.elastic.co/t/memory-issue-with-logstash/31966/2 "2015-10-11T21:05:16Z")

</div>

> [@sampasei](#):
>
> Mongo and Elastichsearch crushes after short time

How do yo know that?

> [@sampasei](#):
>
> After that Elastchsearch seems blocked.

And what do you mean by this?

---

<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:** [July 6, 2017, 5:26am UTC](https://discuss.elastic.co/t/memory-issue-with-logstash/31966/3 "2017-07-06T05:26:54Z")

</div>

Closed on July 6, 2017, 5:26am UTC


