LEAK: ByteBuf.release() was not called before it's garbage-collected

Hi,
I have a problem I have never encountered, so I need some help.
My es cluster has two masters and four data nodes.
Master 1 is the standby node and it is also the problem node.

Everything is working normally!!!
But when I check the log of the master 1, I find this:
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.leakDetection.level=advanced' or call ResourceLeakDetector.setLevel() See http://netty.io/wiki/reference-counted-objects.html for more information.
I added "Dio.netty.leakDetection.level=advanced" to the jvm.options as instructed and waited for the question to reappear.

Then i found this:
LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 3
#3:
Hint: 'cors' will handle the message from this point.
#2:
io.netty.buffer.AdvancedLeakAwareCompositeByteBuf.retain(AdvancedLeakAwareCompositeByteBuf.java:1010)
#1:
Hint: 'encoder_compress' will handle the message from this point.


I've read the introduction of this address: " http://netty.io/wiki/reference-counted-objects.html "
but I'm still confused. I didn't call netty's code directly. What should I do?
Help me please!!!!!
Thanks a lot!

Hi @Mac_Oscar

This looks like a memory leak (and bug that is known in older versions of ES). What version of Elasticsearch are you using?

Hi @Armin_Braun
Sorry for the delay.
My version is 5.6.0,and other nodes do not have this problem

@Mac_Oscar

Thanks for getting back to me on this one. 5.6.0 is quite old at this point and there have been various fixes to Netty memory leaks in Elasticsearch as well as Netty itself since it was released.
There isn't anything you can do to fix this but upgrading to a more recent version of Elasticsearch I'm afraid.