1、问题描述:
服务器连续运行30天之后报 failed to allocate 16777216 byte(s) of direct memory
具体的报错信息如下:
io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 7633633287, max: 7635730432)
at io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:667) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:622) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:772) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:748) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:245) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.PoolArena.allocate(PoolArena.java:215) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.PoolArena.allocate(PoolArena.java:147) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:342) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187) ~[netty-all-4.1.37.Final.jar:4.1.37.Final]
at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:178) ~[netty-all-4.1.37.Final.jar:4.1.37.Fin