You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christoph Fischer <cf...@bb-sw.de> on 2004/02/26 08:53:29 UTC

Hanging tomcat processes on heavy access

Hello everyone,

here is my configuration:
linux server with tomcat 4.1.29 connected to apache 1.3.29 via nod_jk
java version "1.4.2_03"

from tomcat server.xml
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="500"
               acceptCount="10" debug="0"/>

At heavy access times the user gets a blank screen on the browser
and on the server a java process is hanging. Tomcat is still working
and responding to further tasks, but the 'hanging' processes will
stay around until reboot. Unfortunately the hanging processes will
also keep a socket connection on port 8009 to apache, so after some
time the system hangs due to too much connections.

I could rebuild this situation also with jmeter and a simple servlet
which only responds a simple html site, so the problem couldn't come
from my coding.

How can I solve this problem ? Is it coming from tomcat, apache 
or mod_jk???

Thanks very much for any hints
Chris



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


Re: Hanging tomcat processes on heavy access

Posted by Christoph Fischer <cf...@bb-sw.de>.
Hello
and thank you for your response,
until now it workes as I've set up the min.-processes up to 100
and changed the min and max heap to 256/512MB
Chris

jerome moliere wrote:

> Oswald Campesato wrote:
>
>> Hello, Chris:
>>
>> I have a couple of suggestions (but no answers). 
>> 1) you can attach to a process with the 'truss' command and monitor 
>> the read/write activity of the process.  Syntax, options, and 
>> examples of truss can be had via "man truss" or Google "Unix truss 
>> command."  This *might* reveal something.
>>
>> 2) you can kill hanging processes and release the port via
>> a Unix command (the name escapes me right now), which
>> may help reduce the number of time you need to reboot
>>
>> 3) try experimenting with the min/max heap size for Java;
>> perhaps you can set both of them to small values in a test
>> environment to quickly reproduce the problem and use #1
>>
>> Since other people can continue working normally, it does
>> not appear that you've read the maximum number of socket
>> connections (338, if I remember correctly).  Did this problem
>> start after having installed new software or changing the
>> environment?  Perhaps you can try "rolling back" to see if
>> the problem disappears....
>>
>> Cordially,
>>
>> Oswald
>>
>>
>>
>> Christoph Fischer <cf...@bb-sw.de> wrote:
>>
>> Hello everyone,
>>
>> here is my configuration:
>> linux server with tomcat 4.1.29 connected to apache 1.3.29 via nod_jk
>> java version "1.4.2_03"
>>
>> from tomcat server.xml
>>
>> port="8009" minProcessors="5" maxProcessors="500"
>> acceptCount="10" debug="0"/>
>>
>> At heavy access times the user gets a blank screen on the browser
>> and on the server a java process is hanging. Tomcat is still working
>> and responding to further tasks, but the 'hanging' processes will
>> stay around until reboot. Unfortunately the hanging processes will
>> also keep a socket connection on port 8009 to apache, so after some
>> time the system hangs due to too much connections.
>>
>> I could rebuild this situation also with jmeter and a simple servlet
>> which only responds a simple html site, so the problem couldn't come
>> from my coding.
>>
>> How can I solve this problem ? Is it coming from tomcat, apache or 
>> mod_jk???
>>  
>>
> Hi christopher,
> I'd like to add that you may need to improve the mod_jk config using 
> arguments (parameters) like the TIME_WAIT ? could be helpful to 
> release more quickly connections....
> have you setted the KEEP-ALIVE parameter ?
>
> I guess that a deep look to you mod_jk configuration may solve much 
> troubles...
> HTH
> Jerome
>
>

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


Re: Hanging tomcat processes on heavy access

Posted by jerome moliere <jm...@nerim.net>.
Oswald Campesato wrote:

>Hello, Chris:
> 
>I have a couple of suggestions (but no answers).  
> 
>1) you can attach to a process with the 'truss' command and 
>monitor the read/write activity of the process.  Syntax, options, 
>and examples of truss can be had via "man truss" or Google 
>"Unix truss command."  This *might* reveal something.
> 
>2) you can kill hanging processes and release the port via
>a Unix command (the name escapes me right now), which
>may help reduce the number of time you need to reboot
> 
>3) try experimenting with the min/max heap size for Java;
>perhaps you can set both of them to small values in a test
>environment to quickly reproduce the problem and use #1
> 
>Since other people can continue working normally, it does
>not appear that you've read the maximum number of socket
>connections (338, if I remember correctly).  Did this problem
>start after having installed new software or changing the
>environment?  Perhaps you can try "rolling back" to see if
>the problem disappears....
> 
>Cordially,
> 
>Oswald
> 
>
>
>Christoph Fischer <cf...@bb-sw.de> wrote:
>
>Hello everyone,
>
>here is my configuration:
>linux server with tomcat 4.1.29 connected to apache 1.3.29 via nod_jk
>java version "1.4.2_03"
>
>from tomcat server.xml
>
>port="8009" minProcessors="5" maxProcessors="500"
>acceptCount="10" debug="0"/>
>
>At heavy access times the user gets a blank screen on the browser
>and on the server a java process is hanging. Tomcat is still working
>and responding to further tasks, but the 'hanging' processes will
>stay around until reboot. Unfortunately the hanging processes will
>also keep a socket connection on port 8009 to apache, so after some
>time the system hangs due to too much connections.
>
>I could rebuild this situation also with jmeter and a simple servlet
>which only responds a simple html site, so the problem couldn't come
>from my coding.
>
>How can I solve this problem ? Is it coming from tomcat, apache 
>or mod_jk???
>  
>
Hi christopher,
I'd like to add that you may need to improve the mod_jk config using 
arguments (parameters) like the TIME_WAIT ? could be helpful to release 
more quickly connections....
have you setted the KEEP-ALIVE parameter ?

I guess that a deep look to you mod_jk configuration may solve much 
troubles...
HTH
Jerome


-- 
Auteur cahier du programmeur Java tome 2 - Eyrolles 10/2003
http://www.eyrolles.com/php.informatique/Ouvrages/ouvrage.php3?ouv_ean13=9782212111941




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


Re: Hanging tomcat processes on heavy access

Posted by Oswald Campesato <oc...@yahoo.com>.
Hello, Chris:
 
I have a couple of suggestions (but no answers).  
 
1) you can attach to a process with the 'truss' command and 
monitor the read/write activity of the process.  Syntax, options, 
and examples of truss can be had via "man truss" or Google 
"Unix truss command."  This *might* reveal something.
 
2) you can kill hanging processes and release the port via
a Unix command (the name escapes me right now), which
may help reduce the number of time you need to reboot
 
3) try experimenting with the min/max heap size for Java;
perhaps you can set both of them to small values in a test
environment to quickly reproduce the problem and use #1
 
Since other people can continue working normally, it does
not appear that you've read the maximum number of socket
connections (338, if I remember correctly).  Did this problem
start after having installed new software or changing the
environment?  Perhaps you can try "rolling back" to see if
the problem disappears....
 
Cordially,
 
Oswald
 


Christoph Fischer <cf...@bb-sw.de> wrote:

Hello everyone,

here is my configuration:
linux server with tomcat 4.1.29 connected to apache 1.3.29 via nod_jk
java version "1.4.2_03"

from tomcat server.xml

port="8009" minProcessors="5" maxProcessors="500"
acceptCount="10" debug="0"/>

At heavy access times the user gets a blank screen on the browser
and on the server a java process is hanging. Tomcat is still working
and responding to further tasks, but the 'hanging' processes will
stay around until reboot. Unfortunately the hanging processes will
also keep a socket connection on port 8009 to apache, so after some
time the system hangs due to too much connections.

I could rebuild this situation also with jmeter and a simple servlet
which only responds a simple html site, so the problem couldn't come
from my coding.

How can I solve this problem ? Is it coming from tomcat, apache 
or mod_jk???

Thanks very much for any hints
Chris



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


---------------------------------
Do you Yahoo!?
Get better spam protection with Yahoo! Mail