首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >HttpObjectAggregator的Netty 4泄漏异常

HttpObjectAggregator的Netty 4泄漏异常
EN

Stack Overflow用户
提问于 2013-08-19 06:39:22
回答 1查看 831关注 0票数 0

当我的netty服务器负载很重时,它会出现异常。(用LOIC等进行测试)我想知道我做错了什么,或者是HttpObjectAggregator中的一个bug。

代码语言:javascript
复制
WARNING: LEAK: ByteBuf was GC'd before being released correctly.  The following stack trace shows where the leaked object was created, rather than where you failed to release it.
io.netty.util.ResourceLeakException: io.netty.buffer.CompositeByteBuf@1c0eeb6
    at io.netty.util.ResourceLeakDetector$DefaultResourceLeak.<init>(ResourceLeakDetector.java:174)
    at io.netty.util.ResourceLeakDetector.open(ResourceLeakDetector.java:116)
    at io.netty.buffer.CompositeByteBuf.<init>(CompositeByteBuf.java:60)
    at io.netty.buffer.Unpooled.compositeBuffer(Unpooled.java:353)
    at io.netty.handler.codec.http.HttpObjectAggregator.decode(HttpObjectAggregator.java:138)
    at io.netty.handler.codec.http.HttpObjectAggregator.decode(HttpObjectAggregator.java:50)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:334)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:320)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173)
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:334)
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:320)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:497)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:465)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:359)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
    at java.lang.Thread.run(Thread.java:722)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-08-19 10:44:43

很可能您在处理完消息后忘记释放它。你打电话给释放部了吗?

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18307753

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档