问题描述
我正在Windows Server 2008R2和Java 1.8.0_92上运行Tomcat 8.5.3。
该进程消耗大量CPU(4个CPU中约占50%)。
I'm running a Tomcat 8.5.3 on Windows Server 2008R2 and Java 1.8.0_92.The process is consuming a lot of CPU (~ 50% from 4 CPUs).
JTop显示,到目前为止,两个最消耗线程是https -jsse-nio-443-ClientPoller-0和https-jsse-nio-443-ClientPoller-1。
JTop shows that the two most consuming threads are, by far, https-jsse-nio-443-ClientPoller-0 and https-jsse-nio-443-ClientPoller-1.
线程主要在这四个堆栈跟踪上循环:
The threads are mainly looping on thes four stacktraces :
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似乎已解决了该问题。
I had a similar problem on Tomcat 8.5.4 / Linux where I saw very high cpu usage on the poller threads (eg, https-jsse-nio-443-ClientPoller-0 and 1). Upgrading to 8.5.5 seems to have resolved the issue.
可能是此错误:
这篇关于Tomcat 8.5上的JSSE客户端轮询器具有很高的CPU负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!