See below

Am 27.03.2018 um 07:50 schrieb 이의준:
Hi !

English is not my native language; please excuse typing errors.

Why is Tomcat not handling requests with 8 versions, but in the RUNNABLE
state, not the TIME_WAITING state of the Tomcat 7 version?

Please confirm that this operation works normally.

#################Tomcat 7.0.75  jdk 1.7.0.65

#server.xml

     <!-- Define an AJP 1.3 Connector on port 8009 -->

     <Connector port="7009" protocol="AJP/1.3" redirectPort="9443"
URIEncoding="UTF-8"

       acceptCount="200" acceptorThreadCount="2" maxThreads="300"

       minSpareThreads="50" connectionTimeout="15000"/>

#There are more than 40 threads with the following stacks:

"ajp-apr-7009-exec-111" #10247 daemon prio=5 os_prio=0
tid=0x00007fa6b811f000 nid=0x2f51 waiting on condition [0x00007fa6aa7b8000]

    java.lang.Thread.State: TIMED_WAITING (parking)

            at sun.misc.Unsafe.park(Native Method)

            - parking to wait for  <0x0000000083769178> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

            at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

            at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitN
anos(AbstractQueuedSynchronizer.java:2078)

            at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)

            at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)

            at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)

            at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066
)

            at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
27)

            at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

            at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

            at java.lang.Thread.run(Thread.java:745)

These are thread idle in the thread pool.

############Tomcat 8.0.44 jdk 1.8.0.131

#server.xml

     <!-- Define an AJP 1.3 Connector on port 8009 -->

     <Connector port="7009" protocol="AJP/1.3" redirectPort="9443"
URIEncoding="UTF-8"

       acceptCount="200" acceptorThreadCount="2" maxThreads="300"

       minSpareThreads="50" connectionTimeout="15000"/>

There are more than 50 threads with the following stacks:

"ajp-apr-7009-exec-1083" #19321 daemon prio=5 os_prio=0
tid=0x00007fcd1405d800 nid=0x19fe runnable [0x00007fcc373f2000]

    java.lang.Thread.State: RUNNABLE

            at org.apache.tomcat.jni.Socket.recvbb(Native Method)

            at
org.apache.coyote.ajp.AjpAprProcessor.readSocket(AjpAprProcessor.java:256)

            at
org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:197)

            at
org.apache.coyote.ajp.AbstractAjpProcessor.readMessage(AbstractAjpProcessor.
java:1091)

            at
org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java
:804)

            at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:684)

            at
org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEnd
point.java:2458)

            - locked <0x00000000f6bce3a0> (a
org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)

            at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
42)

            at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

            at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

            at java.lang.Thread.run(Thread.java:748)


These are threads which are busy from the point of view of the thread pool, but what they are doing is waiting for more data to arrive on a connection they handle.

So the two groups of threads you have chosen are really in a different state, not only Tomcat or Java version wise.

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to