We are running Tomcat 6. 0.32 with jdk1.6.0_26 on Solaris 10, mod_ajp 1.3 =
and Apache 2.2.21 on all but one production server which is the same except=
for it's running Tomcat 7.0.21.
I have some questions regarding connection timeout settings. Occasionally, =
when the site is busier we see jumps in the number of connections to 8009 a=
nd then that number stays high for about 30 minutes before settling back do=
wn into our average range. A thread dump shows that these connections corre=
spond to these socket threads:
"TP-Processor222" daemon prio=3D3 tid=3D0x00c76400 nid=3D0x5669 runnable [0=
x8cf7f000]
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 <0xcb2a0eb0> (a java.io.BufferedInputStream)
at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:628)
at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:56=
6)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSock=
et.java:693)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(Channe=
lSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Th=
readPool.java:690)
at java.lang.Thread.run(Thread.java:662)
The problem isn't so much that they stick around, but when these first star=
t increasing, there is a noticeable hit in performance and evidence that th=
reads are waiting for resources. Oddly, the one trial Tomcat 7 server with =
the same connector, load and code never experiences this problem. We curren=
tly don't have a connectionTimeout specified for our connector so my plan i=
s to try the following:
<Connector port=3D"8009" protocol=3D"AJP/1.3" connectionTimeout=3D"20000=
" redirectPort=3D"8443" />
Here are my questions:
*Do I also need to set the connection_pool_timeout in the worker? Or is tha=
t the one I should be changing instead of connectionTimeout?
*Is there a different time out setting I should be looking at?
*Is there an easy explanation as to why Tomcat 7 never experiences this iss=
ue? I'm just wondering (o.k. hoping) that there is some magic Tomcat 7 defa=
ult setting some place that we can add to our Tomcat 6 environments that ca=
n help us out until we've upgraded everything.
Thank you,
Kari
_________________________________
Kari Scott
Senior Programmer
kari.scott@cdw.com<mailto:kari.scott@cdw.com>
CDW
5520 Research Park Drive
Madison, WI 53711
Office: 608 298 1223
Fax: 608 288 3007
|