tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Fiol BonnĂ­n <fiol.bon...@terra.es>
Subject Re: Tomcat 4.1.30 Hung!!! With High Traffic
Date Wed, 26 May 2004 06:35:18 GMT
Innovest Ken wrote:

>I only use tomcat, without using Apache... Because my
>site are mainly jsp.
>
>Yes, I have a script to kill the tomcat server before
>starting again. And yes, I saw the 'All threads(150)
>are busy' error message.
>
>Innovest
>  
>


As Denise said, you seem to be maxing out your threads.

Possible reasons include, but are most likely not limited to:

- Too high load.
--- Check with "netstat -n --tcp" if there are about so many (150) 
ESTABLISHED connections. If so, your load is too high. If not, suspect 
on servlets taking too long to respond and clients going away.

- Servlet instances not finishing execution of doGet or doPost or whatever.
--- Trace their starts and ends (possibly using a filter), and detect 
whether the number of "still executing" servlets is steadily increasing 
or not. If so, it will raise 150 and then you'll start getting errors 
and Tomcat will start not responding. The thread dump should tell you 
where the processors are stuck. Most of them in the same place? Then you 
know where to look at.

- Database connections not working properly because of the firewall.
--- Not only you have to check that your app is using connections 
properly, but also that your firewall does not drop them. There are some 
properties for DBCP (testWhileIdle, validationQuery, and all the 
eviction series, which I do not remember off-hand) that will help you 
attack this problem. Set testWhileIdle, and make it test connections 
every so often (say 3-5 minutes). Use a very simple query like "SELECT 1 
FROM DUAL" (Oracle) or "SELECT 1" (others that support it). This will 
refresh your firewall's activity maps. Also check that your firewall 
supports as many concurrent conenctions traversing it as you have (more 
than likely it does, but would be fatal if it does not).

HTH,

Antonio Fiol

Mime
View raw message