当TongWeb端口不能访问时常通过netstat命令检查端口状态是否正常如下图所示引起这个问题的原因主要有1. 访问量过大通过jstack检查线程占满同时队列也占满日志中报Maximum connections queued reached (10000)。2. 之前文章所说NIO2 线程池的JDK bug导致的。还有一种情况是因为内存溢出导致的线程退出。如果在日志中看到如下异常信息说明该线程可能因为内存溢出而退出通过jstack检查相应的线程已经不存在。情况一特别是NIO线程池的 Acceptor线程不存在后不在处理请求。情况二ContainerBackgroundProcessor[StandardEngine[TONGWEB]] 线程终止后则后台清理session的任务终止 导致session只增不减。情况三Auto-deploy-timer线程终止后则自动部署功能失效。2026-05-09 06:41:01 [ERROR] - Exception in thread I/O dispatcher 32 2026-05-09 06:41:01 [ERROR] - java.lang.OutOfMemoryError: Java heap space 2026-05-09 06:41:01 [ERROR] - Exception in thread TW-9060-Acceptor 2026-05-09 06:41:01 [ERROR] - java.lang.OutOfMemoryError: Java heap space [2026-05-11 14:38:07 909] [SEVERE] [http-nio-8088-exec-11] [web-container] [Failed to complete processing of a request] java.lang.OutOfMemoryError: GC overhead limit exceeded [2026-05-11 14:38:06 736] [WARNING] [http-nio-8088-Acceptor-0] [systemout] [Exception in thread http-nio-8088-Acceptor-0 ] [2026-05-11 14:41:22 006] [WARNING] [Auto-deploy-timer] [systemout] [Exception in thread Auto-deploy-timer ] [2026-05-11 14:41:22 813] [WARNING] [RMI RenewClean-[192.168.96.1:7200]] [systemout] [Exception in thread RMI RenewClean-[192.168.96.1:7200] ] [2026-05-11 14:41:22 940] [WARNING] [RMI RenewClean-[192.168.96.1:7200]] [systemout] [java.lang.OutOfMemoryError: GC overhead limit exceeded] [2026-05-11 14:41:22 940] [WARNING] [Auto-deploy-timer] [systemout] [java.lang.OutOfMemoryError: GC overhead limit exceeded] [2026-05-11 14:41:23 789] [WARNING] [http-nio-8088-AsyncTimeout] [systemout] [Exception in thread http-nio-8088-AsyncTimeout ] [2026-05-12 13:29:02 368] [WARNING] [http-nio2-0.0.0.0-8088-exec-5] [systemout] [java.lang.OutOfMemoryError: GC overhead limit exceeded] [2026-05-12 13:29:08 462] [SEVERE] [ContainerBackgroundProcessor[StandardEngine[TONGWEB]]] [core] [Unexpected death of background thread ContainerBackgroundProcessor[StandardEngine[TONGWEB]]] [2026-05-12 13:28:59 914] [WARNING] [Auto-deploy-timer] [systemout] [Exception in thread Auto-deploy-timer ]根据JDK的解释OutOfMemoryError一定会杀死当前线程 只要代码执行时抛出OOM 错误线程会立刻停止运行 不会被 try-catch (Exception) 捕获。