> -----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] Ok will do this.
To complicate things - we are seeing these outofthread problems only in one of 
our production servers - so I need to figure out if there are any differences 
in firewall settings between the 2 servers.

Finally, is it possible that some bad code in the app could be hanging onto 
those RUNNABLE connections which is why tomcat is not releasing them? Or if 
that was the case, would the stack trace of that thread show the code that was 
hanging onto it? In my case, all RUNNABLE connections show the stacktrace 

"TP-Processor4" - Thread t...@29
   java.lang.Thread.State: RUNNABLE
        at java.net.PlainSocketImpl.socketAccept(Native Method)...
        at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:293)...
        at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

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

Reply via email to