本文介绍了如何测试Netty内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了-Dio.netty.leakDetection.level=ADVANCED用于生产中的泄漏检测.还有一些日志:

I add -Dio.netty.leakDetection.level=ADVANCED for leak detecting on production.And there are some logs:

这是否意味着必须发生内存泄漏?

Does it means it must will happen memory leak?

我想在本地环境上对其进行测试,因此我设置了-Dio.netty.leakDetection.level=PARANOID,但是上面没有内存泄漏记录日志.

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.

推荐答案

要检测开发环境中的泄漏,我已使用以下vm参数将堆大小减小到12 MB:-mx12m

To detect leak on my development environment, I have reduce the heap size to 12 MB with this vm argument: -mx12m

现在,Netty能够检测到一些泄漏.

Now with this, Netty is able to detect some leaks.

这篇关于如何测试Netty内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 21:26
查看更多