You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Shifman <ma...@yale.edu> on 2006/04/24 18:55:22 UTC

jsvc creates LOTS of processes

I noticed that jsvc creates about 68 processes on one of my servers.

I start it using an init.d script under redhat 9.
I don't think I have done anything egregious.
...snip
CATALINA_OPTS=" -Djava.awt.headless=true -Xmx750m -Xms750m"
...snip
start(){
$DAEMON_HOME/jsvc \
    -user $TOMCAT_USER \
    -home $JAVA_HOME \
    -Dcatalina.home=$CATALINA_HOME \
    -Djava.io.tmpdir=$CATALINA_HOME/temp \
    -outfile $CATALINA_HOME/logs/catalina.out \
    -errfile '&1' \
    $CATALINA_OPTS \
    -cp $CLASSPATH \
    org.apache.catalina.startup.Bootstrap
    echo "starting tomcat: " $CATALINA_HOME
    echo "tomcat user: " $TOMCAT_USER
    #
    # To get a verbose JVM
    #-verbose \
    # To get a debug of jsvc.
    #-debug \
}

I was getting a 143 error on exiting Tomcat with an old version of jsvc.
I got the version packaged with 5.5.16 and compiled it just in case this 
was fixed.

My 143 error is gone, but there still are lots of processes generated 
when I start Tomcat as a daemon.

I have another server where only 1 jsvc.exe process is started when I 
start Tomcat.

What am I doing wrong on the server with 68 processes.

mas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsvc creates LOTS of processes

Posted by David Smith <dn...@cornell.edu>.
Chances are you are doing nothing wrong. How many threads/processes are 
started when you start tomcat manually?It could easily be the way your 
kernel implementation handles threads (assuming this is Linux). Some 
list threads as processes (version 2.4 and before), newer 2.6 kernels don't.

--David

Mark Shifman wrote:
> I noticed that jsvc creates about 68 processes on one of my servers.
>
> I start it using an init.d script under redhat 9.
> I don't think I have done anything egregious.
> ...snip
> CATALINA_OPTS=" -Djava.awt.headless=true -Xmx750m -Xms750m"
> ...snip
> start(){
> $DAEMON_HOME/jsvc \
>    -user $TOMCAT_USER \
>    -home $JAVA_HOME \
>    -Dcatalina.home=$CATALINA_HOME \
>    -Djava.io.tmpdir=$CATALINA_HOME/temp \
>    -outfile $CATALINA_HOME/logs/catalina.out \
>    -errfile '&1' \
>    $CATALINA_OPTS \
>    -cp $CLASSPATH \
>    org.apache.catalina.startup.Bootstrap
>    echo "starting tomcat: " $CATALINA_HOME
>    echo "tomcat user: " $TOMCAT_USER
>    #
>    # To get a verbose JVM
>    #-verbose \
>    # To get a debug of jsvc.
>    #-debug \
> }
>
> I was getting a 143 error on exiting Tomcat with an old version of jsvc.
> I got the version packaged with 5.5.16 and compiled it just in case 
> this was fixed.
>
> My 143 error is gone, but there still are lots of processes generated 
> when I start Tomcat as a daemon.
>
> I have another server where only 1 jsvc.exe process is started when I 
> start Tomcat.
>
> What am I doing wrong on the server with 68 processes.
>
> mas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


-- 
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsvc creates LOTS of processes

Posted by Mark Shifman <ma...@yale.edu>.
Hi:
I think my problem is a problem with seeing threads.
The kernel I am using is 2.4.21-37.ELsmp
When I launch jsvc with debug things look reasonable and netstat -a also 
looks ok.

I run tomcat as a daemon via jsvc in order to take advantage of the 
system startup stuff for free.
It automatically starts on reboot, I can use /sbin/service tomcat to 
start and stop at will.
So tomcat is run like the other services on my machine, ie sshd, httpd, etc.

Thanks for your help.
mas

Martin Gainty wrote:
> Good Morning Mark
> This was raised by Wade Chandler with previous versions of jsvc using commons-daemon-1.0
> JDK 1.5
> RH 7.3 with Kernel 2.4.2
> http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200501.mbox/%3C1104854884.41dabf6427949@webmail.toadmail.com%3E
> Did you verify you are actually binding?
> (perhaps thru turning on debug option in jsvc.exe and doing a netstat -a before AND after)
> Just for my own understanding What do gain by running thru jsvc.exe vs &?
> Thanks,
> Martin --
> *********************************************************************
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
> ----- Original Message ----- 
> From: "Mark Shifman" <ma...@yale.edu>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Monday, April 24, 2006 12:55 PM
> Subject: jsvc creates LOTS of processes
>
>
>   
>> I noticed that jsvc creates about 68 processes on one of my servers.
>>
>> I start it using an init.d script under redhat 9.
>> I don't think I have done anything egregious.
>> ...snip
>> CATALINA_OPTS=" -Djava.awt.headless=true -Xmx750m -Xms750m"
>> ...snip
>> start(){
>> $DAEMON_HOME/jsvc \
>>    -user $TOMCAT_USER \
>>    -home $JAVA_HOME \
>>    -Dcatalina.home=$CATALINA_HOME \
>>    -Djava.io.tmpdir=$CATALINA_HOME/temp \
>>    -outfile $CATALINA_HOME/logs/catalina.out \
>>    -errfile '&1' \
>>    $CATALINA_OPTS \
>>    -cp $CLASSPATH \
>>    org.apache.catalina.startup.Bootstrap
>>    echo "starting tomcat: " $CATALINA_HOME
>>    echo "tomcat user: " $TOMCAT_USER
>>    #
>>    # To get a verbose JVM
>>    #-verbose \
>>    # To get a debug of jsvc.
>>    #-debug \
>> }
>>
>> I was getting a 143 error on exiting Tomcat with an old version of jsvc.
>> I got the version packaged with 5.5.16 and compiled it just in case this 
>> was fixed.
>>
>> My 143 error is gone, but there still are lots of processes generated 
>> when I start Tomcat as a daemon.
>>
>> I have another server where only 1 jsvc.exe process is started when I 
>> start Tomcat.
>>
>> What am I doing wrong on the server with 68 processes.
>>
>> mas
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>     
> >


-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shifman@yale.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsvc creates LOTS of processes

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning Mark
This was raised by Wade Chandler with previous versions of jsvc using commons-daemon-1.0
JDK 1.5
RH 7.3 with Kernel 2.4.2
http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200501.mbox/%3C1104854884.41dabf6427949@webmail.toadmail.com%3E
Did you verify you are actually binding?
(perhaps thru turning on debug option in jsvc.exe and doing a netstat -a before AND after)
Just for my own understanding What do gain by running thru jsvc.exe vs &?
Thanks,
Martin --
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: "Mark Shifman" <ma...@yale.edu>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Monday, April 24, 2006 12:55 PM
Subject: jsvc creates LOTS of processes


>I noticed that jsvc creates about 68 processes on one of my servers.
> 
> I start it using an init.d script under redhat 9.
> I don't think I have done anything egregious.
> ...snip
> CATALINA_OPTS=" -Djava.awt.headless=true -Xmx750m -Xms750m"
> ...snip
> start(){
> $DAEMON_HOME/jsvc \
>    -user $TOMCAT_USER \
>    -home $JAVA_HOME \
>    -Dcatalina.home=$CATALINA_HOME \
>    -Djava.io.tmpdir=$CATALINA_HOME/temp \
>    -outfile $CATALINA_HOME/logs/catalina.out \
>    -errfile '&1' \
>    $CATALINA_OPTS \
>    -cp $CLASSPATH \
>    org.apache.catalina.startup.Bootstrap
>    echo "starting tomcat: " $CATALINA_HOME
>    echo "tomcat user: " $TOMCAT_USER
>    #
>    # To get a verbose JVM
>    #-verbose \
>    # To get a debug of jsvc.
>    #-debug \
> }
> 
> I was getting a 143 error on exiting Tomcat with an old version of jsvc.
> I got the version packaged with 5.5.16 and compiled it just in case this 
> was fixed.
> 
> My 143 error is gone, but there still are lots of processes generated 
> when I start Tomcat as a daemon.
> 
> I have another server where only 1 jsvc.exe process is started when I 
> start Tomcat.
> 
> What am I doing wrong on the server with 68 processes.
> 
> mas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>