# Seeing io.netty.util.internal.OutOfDirectMemoryError in my logtash logs

**URL:** <https://discuss.elastic.co/t/seeing-io-netty-util-internal-outofdirectmemoryerror-in-my-logtash-logs/214334>\
**Category:** Logstash\
**Tags:** docker\
**Created:** [January 9, 2020, 2:16am UTC](https://discuss.elastic.co/t/seeing-io-netty-util-internal-outofdirectmemoryerror-in-my-logtash-logs/214334 "2020-01-09T02:16:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kommineni24](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kommineni24/32/117038_2.png) [@kommineni24](https://discuss.elastic.co/u/kommineni24)\
**Post date:** [January 9, 2020, 2:16am UTC](https://discuss.elastic.co/t/seeing-io-netty-util-internal-outofdirectmemoryerror-in-my-logtash-logs/214334/1 "2020-01-09T02:16:27Z")

</div>

Hi,

Currently I am using 6.4.2 version of Elastic Stack.  
Started seeing our logstash docker container exited with code 1. Upon troubleshooting logstash logs notices erros releated to memory.  
Exited with Status code 1  
`{"log":"io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 1036789213, max: 1037959168)\n","stream":"stdout","time":"2020-01-02T20:30:02.927550323Z"}`

Assuming its problem with logstash JVM heap size, have increased it from 1GB to 4GB.  
My logstash Java options.  
environment:  
LS\_JAVA\_OPTS: "-Xmx4g -Xms4g"

Still I am seeing same kind of errors.

`{"log":"io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 4225105174, max: 4225236992)\n","stream":"stdout","time":"2020-01-09T02:13:38.84879815Z"}`

Could anyone please help?

---

<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:** [February 6, 2020, 2:16am UTC](https://discuss.elastic.co/t/seeing-io-netty-util-internal-outofdirectmemoryerror-in-my-logtash-logs/214334/2 "2020-02-06T02:16:27Z")

</div>

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