I encountered a similar issue recently. Are you using the 
UnpooledByteBufAllocator by any chance? If so, you need to carefully tune 
(or just disable) the Recycler parameters. Also, a few changes recently 
landed including lower defaults for the recycler memory usage. You can 
disable the recycler by setting  the JVM flag 
-Dio.netty.recycler.maxCapacity=0

You can see the original discussion 
here: https://groups.google.com/forum/#!topic/netty/Ve4lnRvFXjM


On Friday, August 5, 2016 at 6:45:14 AM UTC-4, Mahesh Govind wrote:
>
> Hi ,
>
> I am facing the following out of memory issue .
> This is happening from my client .Could you please let me know some fine 
> tuning options ...
>
>
> io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 
> byte(s) of direct memory (used: 922746880, max: 928514048)
> at 
> io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:613)
> at 
> io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:567)
> at io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:686)
> at io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:675)
> at io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:237)
> at io.netty.buffer.PoolArena.allocate(PoolArena.java:221)
> at io.netty.buffer.PoolArena.allocate(PoolArena.java:141)
> at 
> io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:262)
> at 
> io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:179)
> at 
> io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:170)
> at 
> io.netty.buffer.AbstractByteBufAllocator.ioBuffer(AbstractByteBufAllocator.java:131)
> at 
> io.netty.channel.DefaultMaxMessagesRecvByteBufAllocator$MaxMessageHandle.allocate(DefaultMaxMessagesRecvByteBufAllocator.java:73)
> at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:111)
> at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571)
> at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:512)
> at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:426)
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398)
> at 
> io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)
> at 
> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
> at java.lang.Thread.run(Thread.java:745)
> regards
> Mahesh
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/26733c3c-6e29-40f7-96bf-6b8d116dbf18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to