开发者

the relationship between connection_pool_size and tp-processor?

apache2 workers.properties:

worker.node223.connection_pool_size=100
worker.node223.connection_pool_minsize=50

tomcat server.xml:

<Connector address="192.168.0.17" port="8009" maxHttpHeaderSize="64836"
           maxThreads="350" minSpareThreads="50" maxSpareThreads="200"
           acceptCount="700&q开发者_JAVA百科uot; connectionTimeout="360000" disableUploadTimeout="true"
           enableLookups="false" URIEncoding="UTF-8" protocol="AJP/1.3" />

connection_pool_size should mean that max tcp connection numbers should be establish to backend server(tomcat).When I run kill -3 for tomcat server.as following:

........      
"TP-Processor499" daemon prio=10 tid=0x00007fb8455b5000 nid=0x4521 in Object.wait() [0x00007fb7ffe3f000]
       java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00007fb89017d430> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
        - locked <0x00007fb89017d430> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Thread.run(Thread.java:619)


"TP-Processor498" daemon prio=10 tid=0x00007fb8455b3000 nid=0x4520 runnable [0x00007fb7fff40000]
   java.lang.Thread.State: RUNNABLE
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
    - locked <0x00007fb8a486fde0> (a java.io.BufferedInputStream)
    at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:621)
    at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:559)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:686)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    at java.lang.Thread.run(Thread.java:619)

........

then I get :

there are 295 TP-Processors, I guess 295< connection_pool_size+maxSpareThreads = 300; 295 < maxThreads = 350, it is ok.

there are 189 Tp-processors (In WAITING ) < maxSpareThreads = 200, it is ok.

there are 106 TP-Processors(In RUNNABLE ) > connection_pool_size = 100,I think it is wrong.

am I doing something wrong? And if not, do you know a possible explain to this? thanks


If im reading you right, then 100 is the max threads per worker. Perhaps there is more than one worker running.

http://tomcat.apache.org/connectors-doc/reference/workers.html
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜