AJP threads waiting on socket reads in Jboss 7.1.1.final
jacobmarcus20 Jul 12, 2012 7:36 AMHi all,
I see many threads in a waiting state with the following trace. Is this a problem?
State: RUNNABLE
Total blocked: 3 Total waited: 45
Strack trace:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
org.apache.coyote.ajp.AjpProcessor.read(AjpProcessor.java:1131)
org.apache.coyote.ajp.AjpProcessor.readMessage(AjpProcessor.java:1213)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:451)
org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:445)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:518)
org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)
org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:842)
java.lang.Thread.run(Thread.java:662)
org.jboss.threads.JBossThread.run(JBossThread.java:122)
I see some in the follwoing state. This is what I woud expect as I have configured some core threads.
State: WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@38380f4b
Total blocked: 46 Total waited: 66
Strack trace:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
org.jboss.threads.QueueExecutor.takeTask(QueueExecutor.java:746)
org.jboss.threads.QueueExecutor.access$400(QueueExecutor.java:45)
org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:835)
java.lang.Thread.run(Thread.java:662)
org.jboss.threads.JBossThread.run(JBossThread.java:122)
My thread pool configuration looks like this.
<bounded-queue-thread-pool name="test-ajp" allow-core-timeout="false">
<core-threads count="50"/>
<queue-length count="1"/>
<max-threads count="650"/>
<keepalive-time time="60" unit="seconds"/>
</bounded-queue-thread-pool>
Please let me know why those some of these threads seem to be in a waiting mode. I suspect I am misisng a timeout configuration.