# Suspected memory leak leading to heap OOM in Logstash 5.6.6

**URL:** <https://discuss.elastic.co/t/suspected-memory-leak-leading-to-heap-oom-in-logstash-5-6-6/117807>\
**Category:** Logstash\
**Created:** [January 31, 2018, 12:57pm UTC](https://discuss.elastic.co/t/suspected-memory-leak-leading-to-heap-oom-in-logstash-5-6-6/117807 "2018-01-31T12:57:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Hodges](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@Christopher\_Hodges](https://discuss.elastic.co/u/Christopher_Hodges)\
**Post date:** [January 31, 2018, 12:57pm UTC](https://discuss.elastic.co/t/suspected-memory-leak-leading-to-heap-oom-in-logstash-5-6-6/117807/1 "2018-01-31T12:57:04Z")

</div>

We upgraded to Logstash 5.6.6 across our estate and soon saw Logstash memory usage climb until failure with OOM heap errors on all boxes. The heavier the load the quicker the failure. Each server runs a specific config for its role.

Downgrading to 5.6.5 fixed the problem.

You can see the issue reflected in Memory and CPU Usage on these Nginx proxies. Logstash was upgraded on the 22/01, restarted a couple of times and then downgraded on the 30/01, where the line clearly flattens out to where it was prior to the upgrade.

 ![app-proxies-memory](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9f52917321102461329082417c49d45d427cf989.png)  
 ![app-proxies-cpu-time](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b7e0a938033a08c6d63c49faa4760960540ae712.jpg)

On these proxies, 2 were running v5.6.6 and 2 v5.6.5. It's clear which 2.

 ![pr-proxy-memory](https://us1.discourse-cdn.com/elastic/original/3X/6/6/664225b4d36611ffaa0063a0a56c215e985c299e.png)  
 ![pr-proxy-cpu-time](https://us1.discourse-cdn.com/elastic/original/3X/9/0/909d9de1564e9590ee877d05257db9956ed2913c.png)

We took a look at the heap dump, here's a screenshot of the overview.

 ![Screenshot_logstash_heap](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f0ef0c15eb6e2759dca262be9cf30135801c858b.png)

We saw Logstash recover a few times, and sometimes carry on processing at full heap usage, but at other times it stopped processing without recovery or the process stopping.  
This was on Ubuntu 16.04.3 LTS.

---

<div class="post-metadata">

**Author:** ![jakelandis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jakelandis/32/36163_2.png) [@jakelandis](https://discuss.elastic.co/u/jakelandis)\
**Post date:** [February 14, 2018, 11:35pm UTC](https://discuss.elastic.co/t/suspected-memory-leak-leading-to-heap-oom-in-logstash-5-6-6/117807/2 "2018-02-14T23:35:27Z")

</div>

Conversation is continuing over at [https://github.com/elastic/logstash/issues/9127](https://github.com/elastic/logstash/issues/9127)

---

<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 14, 2018, 11:35pm UTC](https://discuss.elastic.co/t/suspected-memory-leak-leading-to-heap-oom-in-logstash-5-6-6/117807/3 "2018-03-14T23:35:34Z")

</div>

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