dianping / cat

CAT 作为服务端项目基础组件,提供了 Java, C/C++, Node.js, Python, Go 等多语言客户端,已经在美团点评的基础架构中间件框架(MVC框架,RPC框架,数据库框架,缓存框架等,消息队列,配置系统等)深度集成,为美团点评各业务线提供系统丰富的性能指标、健康状况、实时告警等。
Apache License 2.0
18.69k stars 5.43k forks source link

io.netty.util.internal.OutOfDirectMemoryError #2266

Open hzhswyz opened 1 year ago

hzhswyz commented 1 year ago

Describe the bug CAT 服务端运行时OOM [01-16 23:59:37.928] [ERROR] [TcpSocketSender] Error when sending message over TCP socket! io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 941279084, max: 954728448) at io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:725) at io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:680) at io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:758) at io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:734) at io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:245) at io.netty.buffer.PoolArena.allocate(PoolArena.java:215) at io.netty.buffer.PoolArena.allocate(PoolArena.java:147) at io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:342) at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187) at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:178) at io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:115) at com.dianping.cat.message.spi.codec.NativeMessageCodec.encode(NativeMessageCodec.java:110) at com.dianping.cat.message.io.TcpSocketSender.sendInternal(TcpSocketSender.java:284) at com.dianping.cat.message.io.TcpSocketSender.processNormalMessage(TcpSocketSender.java:211) at com.dianping.cat.message.io.TcpSocketSender.run(TcpSocketSender.java:240) at java.lang.Thread.run(Thread.java:748) at org.unidal.helper.Threads$RunnableThread.run(Threads.java:294)