RE: when does Tomcat spawn children and/or fork ?
You run the external process via Runtime.getRuntime().exec(...) ? If so, that should be easy enough for me to find in my JSPs... -Original Message- From: Mike Jackson To: 'Tomcat Users List' Sent: 7/6/2004 6:10 PM Subject: RE: when does Tomcat spawn children and/or fork ? I have a webapp that runs an external process to do some processing. When that's running I have an extra "tomcat" process listed when I do a ps. It's not really tomcat, but something about the way that the JVM forks processes makes it look like it's another tomcat. When the processes finishes the extra "tomcat" goes away and I'm back down to one. It could be that you've got something simliar going on in the webapp(s) that you're running. --mikej -=- mike jackson [EMAIL PROTECTED]
RE: when does Tomcat spawn children and/or fork ?
I have a webapp that runs an external process to do some processing. When that's running I have an extra "tomcat" process listed when I do a ps. It's not really tomcat, but something about the way that the JVM forks processes makes it look like it's another tomcat. When the processes finishes the extra "tomcat" goes away and I'm back down to one. It could be that you've got something simliar going on in the webapp(s) that you're running. --mikej -=- mike jackson [EMAIL PROTECTED] -Original Message- From: Jim Cox [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 2:58 PM To: 'Tomcat Users List' Subject: RE: when does Tomcat spawn children and/or fork ? > : While using Tomcat 5.0.19 on Solaris 8 I occasionally see more than > one > : Tomcat process running (as reported by ps -aef). In each case the "extra" > : process is a child of the original Tomcat process, exists for no > more than a > : few seconds, seems to cause no trouble, and (troublingly?) leaves no trace > : in the log files. > > Since you've ruled out JSP compilation issues, it's time for some > detective work: are you able to trace the extra PID? > > In other words, does the process completley disappear, or does it > exec() and thus become some other command? > > -QM All indications are that it goes away, apparently within a few seconds. I agree about the need for "detective work", just hoping to discover the known areas where Tomcat can be expected to spawn new processes (and set up test cases to examine those first). In the short-term I'll probably add a log stmt or two directly to startup.sh / catalina.sh to either catch the invocation or rule that out. By the way, the only interesting thing I've found so far is that it appears during periods of heavy load (%CPU-wise). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: when does Tomcat spawn children and/or fork ?
> : While using Tomcat 5.0.19 on Solaris 8 I occasionally see more than one > : Tomcat process running (as reported by ps -aef). In each case the "extra" > : process is a child of the original Tomcat process, exists for no more than a > : few seconds, seems to cause no trouble, and (troublingly?) leaves no trace > : in the log files. > > Since you've ruled out JSP compilation issues, it's time for some > detective work: are you able to trace the extra PID? > > In other words, does the process completley disappear, or does it exec() > and thus become some other command? > > -QM All indications are that it goes away, apparently within a few seconds. I agree about the need for "detective work", just hoping to discover the known areas where Tomcat can be expected to spawn new processes (and set up test cases to examine those first). In the short-term I'll probably add a log stmt or two directly to startup.sh / catalina.sh to either catch the invocation or rule that out. By the way, the only interesting thing I've found so far is that it appears during periods of heavy load (%CPU-wise).
Re: when does Tomcat spawn children and/or fork ?
On Tue, Jul 06, 2004 at 02:41:49PM -0400, Jim Cox wrote: : While using Tomcat 5.0.19 on Solaris 8 I occasionally see more than one : Tomcat process running (as reported by ps -aef). In each case the "extra" : process is a child of the original Tomcat process, exists for no more than a : few seconds, seems to cause no trouble, and (troublingly?) leaves no trace : in the log files. Since you've ruled out JSP compilation issues, it's time for some detective work: are you able to trace the extra PID? In other words, does the process completley disappear, or does it exec() and thus become some other command? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
when does Tomcat spawn children and/or fork ?
While using Tomcat 5.0.19 on Solaris 8 I occasionally see more than one Tomcat process running (as reported by ps -aef). In each case the "extra" process is a child of the original Tomcat process, exists for no more than a few seconds, seems to cause no trouble, and (troublingly?) leaves no trace in the log files. For example: root 5425 1 2 Jun 30 ? 107:54 /usr/java/bin/java -Xmx512m -Dtomcat=1 -Djava.awt.headless=true -Djava.endorsed root 20981 5425 0 05:02:17 ?0:00 /usr/java/bin/java -Xmx512m -Dtomcat=1 -Djava.awt.headless=true -Djava.endorsed Another instance captured using /usr/ucb/ps -auxwww, which makes it appear to be an identical process started by startup.sh / catalina.sh: root 5425 37.0 26.4274024264592 ?R Jun 30 146:49 /usr/java/bin/java -Xmx512m -Dtomcat=1 -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/local/jakarta-tomcat-5.0.19/common/endorsed -classpath /usr/java/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.19/bin/bootstrap.jar:/ usr/local/jakarta-tomcat-5.0.19/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/jakarta-tomcat-5.0.19 -Dcatalina.home=/usr/local/jakarta-tomcat-5.0.19 -Djava.io.tmpdir=/usr/local/jakarta-tomcat-5.0.19/temp org.apache.catalina.startup.Bootstrap start root 23399 0.0 0.0274016? ?R 21:03:11 0:00 /usr/java/bin/java -Xmx512m -Dtomcat=1 -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/local/jakarta-tomcat-5.0.19/common/endorsed -classpath /usr/java/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.19/bin/bootstrap.jar:/ usr/local/jakarta-tomcat-5.0.19/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/jakarta-tomcat-5.0.19 -Dcatalina.home=/usr/local/jakarta-tomcat-5.0.19 -Djava.io.tmpdir=/usr/local/jakarta-tomcat-5.0.19/temp org.apache.catalina.startup.Bootstrap start My basic question is under what circumstances does Tomcat create a child and/or fork? I have the JSP compiler "fork" setting set to false in /usr/local/tomcat/conf/web.xml, and in any case the JSP pages in use at the time hadn't changed for months (& therefore recompilation shouldn't even be a factor). I start Tomcat with $CATALINA_HOME/bin/startup.sh. By the way, I rather accidentally stumbled across the "extra" processes while debugging Tomcat memory usage with a shell script that does a ps -aef every minute or so, and occasionally finds more than 1 process. Thanks in advance for any help/information/pointers. -- Jim