我正在Windows Server 2008R2和Java 1.8.0_92上运行Tomcat 8.5.3。该过程消耗大量CPU(4个CPU中约占50%)。
JTop显示到目前为止,两个最消耗线程的线程是https-jsse-nio-443-ClientPoller-0和https-jsse- nio-443-ClientPoller-1。
线程主要在这四个堆栈跟踪上循环:
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method) sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296) sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278) sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159) sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked sun.nio.ch.Util$2@2a3e6629 - locked java.util.Collections$UnmodifiableSet@7cdb1cd3 - locked sun.nio.ch.WindowsSelectorImpl@13dc3a00 sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:791) java.lang.Thread.run(Thread.java:745)
。
sun.nio.ch.WindowsSelectorImpl$SubSelector.processFDSet(WindowsSelectorImpl.java:345) sun.nio.ch.WindowsSelectorImpl$SubSelector.processSelectedKeys(WindowsSelectorImpl.java:315) sun.nio.ch.WindowsSelectorImpl$SubSelector.access$2900(WindowsSelectorImpl.java:278) sun.nio.ch.WindowsSelectorImpl.updateSelectedKeys(WindowsSelectorImpl.java:495) sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:172) sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked sun.nio.ch.Util$2@6f4350d0 - locked java.util.Collections$UnmodifiableSet@36157c3f - locked sun.nio.ch.WindowsSelectorImpl@120cc3aa sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:791) java.lang.Thread.run(Thread.java:745)
sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket0(Native Method) sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket(WindowsSelectorImpl.java:473) - locked java.lang.Object@450e5040 sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:174) sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked sun.nio.ch.Util$2@6f4350d0 - locked java.util.Collections$UnmodifiableSet@36157c3f - locked sun.nio.ch.WindowsSelectorImpl@120cc3aa sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:791) java.lang.Thread.run(Thread.java:745)
java.lang.Object.notifyAll(Native Method) sun.nio.ch.WindowsSelectorImpl$StartLock.startThreads(WindowsSelectorImpl.java:189) - locked sun.nio.ch.WindowsSelectorImpl$StartLock@1c512d03 sun.nio.ch.WindowsSelectorImpl$StartLock.access$300(WindowsSelectorImpl.java:181) sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:153) sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked sun.nio.ch.Util$2@2a3e6629 - locked java.util.Collections$UnmodifiableSet@7cdb1cd3 - locked sun.nio.ch.WindowsSelectorImpl@13dc3a00 sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:791) java.lang.Thread.run(Thread.java:745)
任何的想法 ?
我在Tomcat 8.5.4 / Linux上遇到了类似的问题,在轮询线程上我看到了很高的CPU使用率(例如https-jsse- nio-443-ClientPoller-0和1)。升级到8.5.5似乎已解决了该问题。
可能是这个错误:https : //bz.apache.org/bugzilla/show_bug.cgi?id=60030