I want to state off the top that I didnt develop the application. I have been slowly bringing the server and application up to some respecitablity. I have upgraded the Java to 1.4.2 (it was at 1.3.2) and added Apache/Mod_jk2 and upgraded to Tomcat 5. What I am about to describe has been happening since I took the project over. I start the application and there are 41 processes that are present when I do a ps -aef, later on there are 15 more, a little later there are 10, for a total of 66. This grows and I cant tell if it shrinks. There is also a watcher application that starts and restarts Tomcat processes if it can not connect to the application.
Okay enough of that. I have a test server I setup myself, and have done all the same stuff on, Apache/Tomcat/Mod_jk. However when I start up there is one one process that starts. When I hit it with some load, it stays the same, one process.
Also in JAVA_OPTS i have seen many people referring to -server, I have set the JAVA_OPTS to headless.
Any help, or pointers about TOmcat and servers would be appreciated.
On Linux, especially the older 2.4 based kernels, threads == processes. Therefore, whenever Tomcat spawns a new thread your 'ps' will show a new process. As with all servlet containers it is up to Tomcat when to reap those threads. It may not - and that is why you see that the number of processes is growing.
Unless you're getting several hundred I wouldn't be concerned about it.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
posted 14 years ago
Okay thats what I thought. The way I was thinking of handling this, is something that I have done on other sites that are older and had some problems with clearing out and that is to restart the application occasionally, 2-3 times a week.