I am new to netty API
and I am using netty3.5.2 to develop client and server communication server,
but the app always run full GC,
I use jmap to dump the memory and
use jhat to show which object occupied the memory.
And there are 6413363 instances of DefaultChannelFuture
.
can someone tell which thread create the DefaultChannelFuture
instances
and how and when they will be released?
Top 4 instances suspected
6413363 instances of class org.jboss.netty.channel.DefaultChannelFuture
631971 instances of class org.jboss.netty.util.internal.LinkedTransferQueue$Node
630934 instances of class org.jboss.netty.buffer.BigEndianHeapChannelBuffer
630767 instances of class org.jboss.netty.channel.DownStreamMessageEvent
You generating messages to fast. It overload message queue.
Check nethwork load.
This question is a bit old now so not sure if you have found an answer. I haven't used it but the Netty in Action book describes a leak detector:
Netty contains a so called
ResourceLeakDetector
which will sample about 1% of buffer allocations to check if there is a leak in your application. In case of a detected leak you will see a log message similar to the following:LEAK: ByteBuf.release() was not called before it's garbage-collected. Enable advanced leak reporting to find out where the leak occurred. To enable advanced leak reporting, specify the JVM option
-Dio.netty.leakDetectionLevel=advanced
or callResourceLeakDetector.setLevel()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With