> -----Original Message----- > From: Rainer Jung [mailto:rainer.j...@kippdata.de] > Sent: Wednesday, May 20, 2009 11:53 AM > To: Tomcat Users List > Subject: Re: Running out of tomcat threads - why many threads in RUNNABLE > stage even with no activity > > On 20.05.2009 19:47, Caldarale, Charles R wrote: > >> From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] > >> Subject: RE: Running out of tomcat threads - why many threads > >> inRUNNABLEstage even with no activity > >> > >>>> - Setting connectionTimeout in server.xml seems to have resolved > >>>> the issue > >> Only because you're throwing away what appears to be a usable > >> connection that's designed to be persistent. > > > > Do you have something between Tomcat and httpd that could be silently > closing connections? (Some badly behaved firewalls are known to do this.) > That would make the existing AJP connections useless, without notifying > the Tomcat threads that the connection is no longer there. Setting the > timeout would allow those connections to be discarded and new ones > created. > > That's a good point. You should check both sides by using "netstat -an". > The Apache side and the Tomcat side (without connectionTimeout, so you > can see the problem in the original form). See whether the number of AJP > connections in the various TCP states differs much between the netstat > output on the Apache and on the Tomcat system. > [Pantvaidya, Vishwajit] My tomcat connector port is 21065. Netstat shows following output under "Active Internet Connections":
On httpd machine Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN tcp 1 0 129.41.29.243:43237 172.27.127.201:21065 CLOSE_WAIT tcp 1 0 129.41.29.243:43244 172.27.127.201:21065 CLOSE_WAIT tcp 1 0 129.41.29.243:43245 172.27.127.201:21065 CLOSE_WAIT tcp 1 0 129.41.29.243:43225 172.27.127.201:21065 CLOSE_WAIT tcp 1 0 129.41.29.243:43227 172.27.127.201:21065 CLOSE_WAIT tcp 0 0 129.41.29.243:43239 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43238 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43243 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43242 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43241 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43240 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43247 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43246 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43219 172.27.127.202:21069 TIME_WAIT tcp 0 0 129.41.29.243:43209 172.27.127.202:21069 ESTABLISHED tcp 0 0 129.41.29.243:43208 172.27.127.202:21069 TIME_WAIT On tomcat machine Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43216 FIN_WAIT2 tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43217 FIN_WAIT2 tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43218 FIN_WAIT2 tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43211 TIME_WAIT tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43212 FIN_WAIT2 tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43213 FIN_WAIT2 tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43214 FIN_WAIT2 tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43215 TIME_WAIT tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43204 TIME_WAIT tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43205 TIME_WAIT tcp 0 0 ::ffff:172.27.127.201:21065 ::ffff:129.41.29.243:43206 TIME_WAIT - My thread dump shows 8 TP-Processor threads - but this output has 11 threads. - why do the 11 threads in the httpd o/p show port 21069 in foreign addr. Or are those not the correct threads I should be looking at? - currently I do have connectionTimeout set in server.xml. I will need to wait until night to reset that. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org