tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Tomcat Server CPU utilization goes upto 400%
Date Wed, 13 Jun 2007 10:29:11 GMT
This is an old version so you might be see'ing gc issues. (but that is a 
wild guess).

There isn't enough detail to debug, but when the situation arises - do 
the following - get thread dumps a look for "odd stuff"
1) kill -3 tomcat when tomcat is running OK - so you have a base line
2) Then when things are going bad kill -3 to get a stack trace of all 
the threads and look for what is running and "out of the ordinary" - 
typically you might need 2 or 3 dumps for a better comparision
3) When things get really slow - do a final stack trace (via kill -3) 
before you restart tomcat. We luck this trace will confirm any theories 
you saw in step 2.

Good luck.

-Tim

Sumit Gaikaiwari wrote:
> Hello,
> 
>  
> 
> We are using tomcat 5.0.25 on Red Hat Enterprise Linux server. There two
> applications in webapps. We are facing an issue from around 3-4 months
> where the CPU utilization by java process (tomcat) goes quite high:
> around 400% in every 4-5 days. The application gets very slow and tomcat
> needs to be restarted for normal operation. The output of top command is
> as below-
> 
>  
> 
> [root@v3portal2 jakarta-tomcat-5.0.25]# top
> 
> Tasks:  78 total,   1 running,  77 sleeping,   0 stopped,   0 zombie
> 
> Cpu(s): 25.1% us,  0.1% sy,  0.0% ni, 74.5% id,  0.2% wa,  0.0% hi,
> 0.0% si
> 
> Mem:   4086472k total,  2487676k used,  1598796k free,   217464k buffers
> 
> Swap:  6094824k total,        0k used,  6094824k free,  1811576k cached
> 
>  
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 
>  1038 root      16   0  545m 244m  61m S  101  6.1   1156:22 java
> 
>     1 root      16   0  2556  552  472 S    0  0.0   0:01.17 init
> 
>     2 root      RT   0     0    0    0 S    0  0.0   0:00.31 migration/0
> 
>  
> 
>  
> 
> Here is the status of active threads-
> 
> Thread Status-
> 
>  
> 
> [root@v3portal2 jakarta-tomcat-5.0.25]# ps -Le -o
> pid,user,s,lwp,pcpu,args | awk '$3 != "S" { print }'
> 
>  1038 root     R  1093 19.8 /usr/local/j2sdk1.4.2_12/bin/java -Xmx256m
> -Xms128m -Djava.awt.headless=true -Dsun.awt.font.advancecache=off
> -Djava.endorsed.dirs=/usr/local/jakarta-tomcat-5.0.25/common/endorsed
> -classpath
> /usr/local/j2sdk1.4.2_12/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.25/
> bin/bootstrap.jar:/usr/local/jakarta-tomcat-5.0.25/bin/commons-logging-a
> pi.jar -Dcatalina.base=/usr/local/jakarta-tomcat-5.0.25
> -Dcatalina.home=/usr/local/jakarta-tomcat-5.0.25
> -Djava.io.tmpdir=/usr/local/jakarta-tomcat-5.0.25/temp
> org.apache.catalina.startup.Bootstrap start
> 
> 20544 root     R 20544  0.0 ps -Le -o pid,user,s,lwp,pcpu,args
> 
>  
> 
> This was status at certain instant of time. After 5 hours from this
> instant, the utilization reached to 400% and also there were many
> threads which were using almost 150% of CPU time.
> 
>  
> 
> The system configuration is -
> 
>  
> 
> [root@v3portal2 ~]# wget --quiet -O - --user admin --password nimda
> http://localhost:8080/manager/serverinfo
> 
> OK - Server info
> 
> Tomcat Version: Apache Tomcat/5.0.25
> 
> OS Name: Linux
> 
> OS Version: 2.6.9-42.0.2.ELsmp
> 
> OS Architecture: i386
> 
> JVM Version: 1.4.2_12-b03
> 
> JVM Vendor: Sun Microsystems Inc.
> 
>  
> 
> Please can any one tell me possible cause for this issue? This issue has
> become very critical and needs to be fixed out soon.


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


Mime
View raw message