netty: Possible direct memory leak
Expected behavior
Working normally with constant memory consumption
Actual behavior
Memory keep growing and eventually ends out of memory
Steps to reproduce
I have an application which creates 1500 connections every seconds. Memory consumption keep increasing and eventually ends out of memory. I monitored the heap whith many tools (jvisualvm, jmap, jcmd) and it looks ok. Insetad, java internal memory looks the probelem. I suspect it is a problem with netty because adding “-Dio.netty.tryUnsafe=false” to java parameters solves the issue (memory keeps steady and stable)
Netty version
4.1.16-final
JVM version (e.g. java -version)
openjdk version “1.8.0_111” OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2~bpo8+1-b14) OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)
OS version (e.g. uname -a)
Linux CR1 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 GNU/Linux in a docker container
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 42 (20 by maintainers)
I believe I have also encountered this bug, but through grpc-java’s use of netty. I have a small go app that is doing the load testing and makes the leak appear. I will spend some time and modify the app to execute against one of the examples, and share it so troubleshooting can be done without relying on log files.