关闭内存泄露监测;提高业务线程池容量

This commit is contained in:
Guoqs
2025-11-03 16:29:32 +08:00
parent 545aaf5126
commit 3e39c8aa82
3 changed files with 118 additions and 59 deletions

View File

@@ -1,53 +1,115 @@
002212025092820295010818351972839817216
002212025092917522210818674731071827968
002212025092919445710818703065306484736
002212025092810523010818206682224754688
002212025092619404410817614839871291392
002212025092608483010817450698426650624
002212025092606002710817408408182009856
002212025092617012210817574734116651008
002212025092918131810818680001646526464
002212025092808501210818175903096442880
002212025092612044610817500090781089792
002212025092813205610818244035370614784
002212025092608300410817446060113477632
002212025092608145510817442249336643584
002212025092919414910818702275300925440
002212025092709531710817829393695723520
002212025092709513410817828959585251328
002212025092720230710817987896452272128
002212025092710310710817838913004351488
002212025092719255010817973478460981248
002212025092809372810818187800906792960
002212025092912111810818588900239712256
002212025092907143110818514213019021312
002212025092911265210818577720381272064
002212025092823091110818392072865026048
002212025092611545010817497591747665920
002212025092911223210818576625885585408
002212025092913422910818611847100735488
002212025092918581310818691306298535936
002212025092814004110818254038605602816
002212025092613400110817524062499491840
002212025092822065310818376395601055744
002212025092817384410818308912504475648
002212025092619090710817606881816989696
002212025092909142510818544385944260608
002212025092919391910818701649460445184
002212025092615194710817549168869232640
002212025092814442010818265022665691136
002212025092907262010818517185166041088
002212025092920432310818717770158649344
002212025092901265010818426713785491456
002212025092814481210818265996293382144
002212025092719533110817980444130377728
002212025092811233810818214515007930368
002212025092807305910818155966722285568
002212025092817125510818302415565029376
002212025092809592810818193335710502912
002212025092820213910818349914975703040
002212025092918040710818677689578532864
002212025092819250010818335657450389504
002212025092701581310817709835202801664
002212025092917243910818667758817234944
002212025092707275110817792790172499968
002212025103006385110829739258861731840
002212025103006420410829740069440344064
002212025103006283610829736680488869888
002212025103006425710829740292191461376
002212025103006510810829742351670218752
002212025103007033710829745495183630336
002212025103007063710829746247075504128
002212025103006563710829743729515831296
002212025103007413510829755049850081280
002212025103007563410829758817803067392
002212025103008082610829761806802526208
002212025103008172210829764053775060992
002212025103008203310829764852630556672
002212025103008451910829771085018189824
002212025103008035210829760653620559872
002212025103008341410829768296875573248
002212025103008311510829767546581729280
002212025103009050210829776049593528320
002212025103009164510829778997153243136
002212025103009035710829775774065516544
002212025103010360110829798945569247232
002212025103010515810829802958759043072
002212025103011103310829807636007800832
002212025103010574410829804408784429056
002212025103010582310829804573683511296
002212025103011425610829815784164724736
002212025103011180610829809534907621376
002212025103011365610829814275146399744
002212025103011470410829816825962704896
002212025103011360610829814064143540224
002212025103012073410829821986152013824
002212025103012135010829823562962882560
002212025103012193410829825004519976960
002212025103012155610829824090044268544
002212025103011513610829817965404143616
002212025103012015110829820544775245824
002212025103012131210829823403176669184
002212025103012244210829826297279942656
002212025103012264910829826830690598912
002212025103012040310829821101330010112
002212025103012211610829825432771010560
002212025103013020710829835714712981504
002212025103013365010829844450793910272
002212025103013402010829845328393326592
002212025103013112910829838070657720320
002212025103013285910829842473821278208
002212025103013440410829846268496224256
002212025103014092510829852649815199744
002212025103013563610829849422885466112
002212025103013551610829849089442476032
002212025103014243010829856444506857472
002212025103015193310829870297995173888
002212025103014490310829862624188854272
002212025103015283110829872556300709888
002212025103015104910829868102130208768
002212025103015322410829873531522555904
002212025103015400910829875484096872448
002212025103015373910829874852334063616
002212025103015185110829870121872142336
002212025103015321510829873494927257600
002212025103015493310829877848140840960
002212025103015453910829876868414316544
002212025103016270310829887285895245824
002212025103015542310829879064275103744
002212025103016180910829885047130980352
002212025103015552810829879337345245184
002212025103015584410829880159063937024
002212025103016133410829883893890314240
002212025103015530310829878727686397952
002212025103016065910829882235839979520
002212025103016400410829890563055955968
002212025103016161910829884583828180992
002212025103016435610829891535513759744
002212025103016012910829880851891654656
002212025103016565310829894791719727104
002212025103016214610829885954153402368
002212025103016462710829892168778137600
002212025103016344910829889242361917440
002212025103017020210829896090116845568
002212025103016381810829890116043845632
002212025103017031210829896383655190528
002212025103017061310829897141163270144
002212025103016331610829888850093821952
002212025103016583010829895201998127104
002212025103016534510829894005275127808
002212025103017021510829896145112584192
002212025103018125410829913922095423488
002212025103017521010829908704511303680
002212025103018340010829919235288752128
002212025103018222710829916327029686272
002212025103018254710829917167106834432
002212025103018390710829920523313364992
002212025103018225010829916421820919808
002212025103018482210829922848148996096
002212025103018514710829923709067608064
002212025103019265910829932569425784832
002212025103018580410829925289510748160
002212025103018462110829922341158285312
002212025103019160110829929809535991808
002212025103019390710829935620681240576
002212025103019104710829928489152319488
002212025103019282510829932928399466496
002212025103019303610829933476599201792
002212025103018585710829925514170220544
002212025103018525910829924010419957760
002212025103019402010829935928731922432
002212025103019383110829935469262696448
002212025103019264710829932515713507328
002212025103020043210829942017250721792
002212025103020481810829953033279811584
002212025103021045210829957200211787776
002212025103021125110829959211212742656
002212025103021572010829970406447652864
002212025103022020110829971581943312384
002212025103021454810829967501485281280

View File

@@ -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);

View File

@@ -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 {