Java Visual VM 사용 : WAIT 상태에서 거의 100 개의 스레드를 볼 수 있습니다. JBoss의 server.xml에 WAIT 상태의 HTTP 스레드 수가 매우 높음
난이 : 스레드의 대부분 상태가 다음에있는 스레드 덤프에서<mbean code="org.jboss.util.threadpool.BasicThreadPool"
name="jboss.system:service=ThreadPool">
<attribute name="Name">JBoss System Threads</attribute>
<attribute name="ThreadGroupName">System Threads</attribute>
<attribute name="KeepAliveTime">60000</attribute>
<attribute name="MaximumPoolSize">10</attribute>
<attribute name="MaximumQueueSize">1000</attribute>
<attribute name="BlockingMode">run</attribute>
</mbean>
:
<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"/>
나는처럼 보이는 제이 보스 - Service.xml에서 ThreadPool이있다 :
"http-0.0.0.0-8180-97" - Thread [email protected]
java.lang.Thread.State: WAITING
at java.lang.Object.wait(Native Method)
- waiting on <23791834> (a org.apache.tomcat.util.net.MasterSlaveWorkerThread)
at java.lang.Object.wait(Object.java:485)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.await(MasterSlaveWorkerThread.java:81)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:107)
at java.lang.Thread.run(Thread.java:619)
자바 비주얼 VM은 나열 데몬 스레드,536,913,632에 대해 아주 높은 수 라이브 10 : 176 데몬 : 171
것은 내가 작업자 스레드가 유휴 상태 일 때, 일반적으로 몇 가지 새로운 일을위한 빈 큐에 대기 JBoxx 4 배
이 프로덕션 또는 dev/text env입니까? – Santosh
몇 개의 클라이언트가 연결되어 있습니까? 현재 아무도 없다면 '보통'몇 개가 연결 되나요? 소켓 객체가 대기 상태가 될 때까지 기다리는 스레드 더미가있는 threadPool 일뿐입니다. 그래서 물건을 만들기 시작할 수 있습니다. –
어쨌든, 그렇게 많은 것은 아닙니다. 내 상자를 잠시 살펴보면 'NT kernel & System': 241, 'Kaspersky Anti-Virus': 63, 'Windows Sidebar'의 경우 거의 믿을 수없는 669 개의 스레드가 표시됩니다 ( –