I add -Dio.netty.leakDetection.level=ADVANCED
for leak detecting on production.
And there are some logs:
ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information. WARNING: 4 leak records were discarded because the leak record count is limited to 4. Use system property io.netty.leakDetection.maxRecords to increase the limit. Recent access records: 5
Does it means it must will happen memory leak?
I want to test it on local environment, so I set -Dio.netty.leakDetection.level=PARANOID
, but there are no the above memory leak records logs.
To detect leak on my development environment, I have reduce the heap size to 12 MB with this vm argument: -mx12m
Now with this, Netty is able to detect some leaks.
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