I am trying to port an application over to Tomcat v 4.1.12 which has worked fine for two years running in WebSphere on an iSeries. The JSPs were at the .91 level. I have updated them to the 1.2 level. In addition, I have installed the tomcat-util.jar from 4.1.14 to fix the erroneous ssl debug messaging. From the user’s perspective everything looks the same. On the server side though, I seem to have a runaway thread problem. The Tomcat manager app shows the number of active sessions to be anywhere between 400 and 700 during the day, dwindling to a few dozen at night. (Incidentally, the session count is always in one group: the 30-40 minute one - I expected a breakdown in 10 minute intervals). But the thread count just keeps rising. When the count reaches the maxProcessors limit a message, “[INFO]ThreadPool - -All threads are busy, waiting. Please increase maxThreads or check the servlet status” appears in the log. I have tried “suggesting” garbage collection to the JVM at various times but to no avail.

Here are the <Connector> definitions in use:

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="80" minProcessors="5" maxProcessors="2500"
enableLookups="true" redirectPort="443"
acceptCount="25" debug="0" connectionTimeout="20000"
useURIValidationHack="false" />

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="443" minProcessors="25" maxProcessors="2500"
enableLookups="true"
acceptCount="25" debug="0" scheme="https" secure="true"
useURIValidationHack="false">
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
clientAuth="false" keystoreFile="**filename**"
keystorePass="**password**" keystoreType="**type**" protocol="TLS"/>
</Connector>

(There is also the standard Coyote/JK2 AJP 1.3 Connector on 8009 but it looks like I don't need that as I'm using Tomcat as a standalone server)


Here are my questions:

Are there any known issues with Tomcat and excessive thread counts?
(Grasping at straws here I know. I have not found any other relevant reference to Tomcat having thread issues like these, yet the same Java code has served well for two years.)

Could the lack of a breakdown list in the /manager/sessions output be a symptom of a thread problem or is it just a newbie configuration error?

Another item that might be an issue is persistent sessions. I don’t want them. I invalidate() the session when a user logs out. To that end I have included the following within each <context> group:

<Manager className="org.apache.catalina.session.PersistentManager"
debug="0"
saveOnRestart="false"
maxActiveSessions="-1"
minIdleSwap="1800"
maxIdleSwap="-1"
maxIdleBackup="-1">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>

(I have also used –1 for the minIdleSwap. I changed it to 1800 to try and keep the sessions in memory in case that was part of the problem.) Is this the right approach to take? I’m concerned that something is wrong here because if I end Tomcat and restart it the cpu usage goes from an average of 6% to 40+%. A second restart puts it up to 99%. The system maintains these rates until I switch to another server (At least the pages still serve fine though).

Lastly, in the event that WebSphere has just been covering my tracks well, I would also welcome suggestions of Java discussion lists anyone has had success with where I could post some particulars regarding our multithreaded processing.


Thanks in advance!



Mark Walker


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to