mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
关闭内存泄露监测;提高业务线程池容量
This commit is contained in:
@@ -15,9 +15,6 @@ import io.netty.handler.codec.mqtt.MqttEncoder;
|
||||
import io.netty.handler.logging.LogLevel;
|
||||
import io.netty.handler.logging.LoggingHandler;
|
||||
import io.netty.handler.timeout.IdleStateHandler;
|
||||
import io.netty.util.ResourceLeakDetector;
|
||||
import io.netty.util.concurrent.DefaultEventExecutorGroup;
|
||||
import io.netty.util.concurrent.EventExecutorGroup;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -75,8 +72,8 @@ public class NettyServerManager implements CommandLineRunner {
|
||||
|
||||
ChannelFuture future = bootstrap.bind(port).sync();
|
||||
|
||||
// 在启动时启用内存泄漏检测
|
||||
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID);
|
||||
// 在启动时启用内存泄漏检测 2025年11月3日16点23分关闭内存泄露检测
|
||||
// ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID);
|
||||
|
||||
if (future.isSuccess()) {
|
||||
log.info("NettyServer启动成功, 开始监听端口:{}", port);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class NettyServerChannelInitializer extends ChannelInitializer<SocketChan
|
||||
private EchoServerHandler echoServerHandler;
|
||||
|
||||
// 引入业务线程池
|
||||
final EventExecutorGroup businessGroup = new DefaultEventExecutorGroup(16);
|
||||
final EventExecutorGroup businessGroup = new DefaultEventExecutorGroup(32);
|
||||
|
||||
@Override
|
||||
protected void initChannel(SocketChannel channel) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user