On 19.05.2009 02:54, Caldarale, Charles R wrote: >> From: Pantvaidya, Vishwajit [mailto:vpant...@selectica.com] >> Subject: RE: Running out of tomcat threads - why many threads in >> RUNNABLEstage even with no activity >> >> Ok - so then the question is when does tomcat transition the thread >> from Running to Waiting? Does that happen after AJP drops that >> connection?
RUNNABLE and WAITING are thread states in the JVM. They don't relate in general to states inside Tomcat. In this special situation they do. The states you observe are both completely normal in themselves. One (the stack you abbreviate with RUNNABLE) is handling a persistant connection between web server and Tomcat which could send more requests, but at the moment no request is being processed, the other (you abbreviate with WAITING) is available to be associated with a new connection that might come in some time in the future. > That's my understanding; I would presume some from of keep-alive is > in play. However, others know the AJP characteristics better than I HTTP Keep-Alive does not change the picture. It's transparent to Tomcat and mod_jk. Those Keep-Alice packets do not count as requests. > do. Rainer is the ultimate resource, but I suspect he's asleep right > now. > >> So could the problem be occurring here because AJP is holding on to >> connections? > Sorry, I haven't been following the thread that closely. Not sure > what the problem you're referring to actually is, but having a Tomcat > thread reading input from the AJP connector is pretty normal. The same to me. What's the problem? AJP is designed to reuse connections (use persistent connections). If you do not want them to be used for a very long time or like those connections to be closed when being idle, you have to configure the appropriate timeouts. Look at the timeouts documentation page of mod_jk. In general your max thread numbers in the web server layer and in the Tomcat AJP pool need to be set consistently. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org