gpt4 book ai didi

apache - connection_pool_size 和tp-processor 之间的关系?

转载 作者:行者123 更新时间:2023-11-28 22:22:55 26 4
gpt4 key购买 nike

apache2 worker.properties:

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

tomcat 服务器.xml:

<Connector address="192.168.0.17" port="8009" maxHttpHeaderSize="64836"
maxThreads="350" minSpareThreads="50" maxSpareThreads="200"
acceptCount="700" connectionTimeout="360000" disableUploadTimeout="true"
enableLookups="false" URIEncoding="UTF-8" protocol="AJP/1.3" />

connection_pool_size 应该意味着最大 tcp 连接数应该建立到后端服务器(tomcat)。当我为 tomcat 服务器运行 kill -3 时,如下所示:

........      
"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)

........

然后我得到:

有295个TP-Processor,我猜是295< connection_pool_size+maxSpareThreads = 300; 295 < maxThreads = 350,没问题。

有 189 个 Tp 处理器(在 WAITING 中)< maxSpareThreads = 200,没问题。

有 106 个 TP-Processors(In RUNNABLE ) > connection_pool_size = 100,我认为这是错误的。

我做错了什么吗?如果不是,您知道对此的可能解释吗?谢谢

最佳答案

如果我没看错,那么 100 是每个工作线程的最大线程数。可能有不止一个 worker 在运行。

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

关于apache - connection_pool_size 和tp-processor 之间的关系?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7022803/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com