收到請求後,http線程在60秒內保持忙碌狀態。使用JConsole,我可以看到,在這段時間內,線程停留在:Jboss 7 - 線程僅在60秒後釋放
State: RUNNABLE
Stack trace:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:150)
java.net.SocketInputStream.read(SocketInputStream.java:121)
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:721)
org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:359)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:821)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:508)
org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)
org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:826)
java.lang.Thread.run(Thread.java:722)
org.jboss.threads.JBossThread.run(JBossThread.java:122)
這是爲什麼?不應該立即使用並釋放線程?這會在高峯時間影響我的服務器,導致長時間等待。
有人可以解釋我這種行爲,我如何禁用它或減少60秒的時間?
謝謝大家, 最好的問候
我對JBoss並不熟悉,但我想知道這是否與保持活動配置有任何關係。 – Augusto
保持活動時間設置爲10秒。在Jboss中,保持活動時間表明一個線程在被銷燬之前還活着的時間。 但是我有150個核心線程,永遠不會被破壞,對那些線程來說,保持活動時間什麼也不做... Obrigado Augusto – flp05