You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jan gestre <ip...@gmail.com> on 2011/02/01 15:30:01 UTC

Optimize CPU Hogging Tomcat 6

Hi Everyone,

We have an Apache Tomcat 6 server (HA cluster using DRBD) that is
hogging the CPU, this happens when there are simultaneous users
accessing at the same time, which should be considered normal because
they're only 30. How will I optimize Tomcat?

Here's my server.xml file:

[root@node1 ~]# cat /web/tomcat/tomcat6/conf/server.xml
<?xml version='1.0' encoding='utf-8'?>

<Server port="8005" shutdown="SHUTDOWN">

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
  <!--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
/>
  <!-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
/>


  <GlobalNamingResources>

    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>


  <Service name="Catalina">


        <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />




    <Engine name="Catalina" defaultHost="localhost">



      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>


      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

              </Host>
    </Engine>
  </Service>
</Server>


Many thanks!

jan

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


Re: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 2/2/2011 8:44 AM, Caldarale, Charles R wrote:
>> From: henry human [mailto:henry_human@yahoo.de] 
>> Subject: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger
> 
>> I get the following error when I try to call a smal java 
>> application(hello friends!) which i placed in a jar file.
>> the application has the log4j.jar in its lib directory 
>> (and classpath) and calls the log4j.logger like this:
>> private static final Logger LOGGER = Logger.getLogger(Hello.class);
>> It works when i run the application in eclipse.
>> but not as a JAR application!(he application is not running 
>> on tomcat an is only a smal commandline application)
> 
>> Error:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/log4j/Logger
> 
> Two questions:
> 
> 1) What's the name of this mailing list?
> 
> 2) Was there anything in your description related to Tomcat?

+1

Also

3) Don't hijack threads.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1J6RgACgkQ9CaO5/Lv0PDxHQCgoeyMQ5jB2n1ypPIdl4FYwEYL
W04AniAn85VTSiBymtyFRRjKH3ruBpma
=VK5D
-----END PGP SIGNATURE-----

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


RE: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: henry human [mailto:henry_human@yahoo.de] 
> Subject: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

> I get the following error when I try to call a smal java 
> application(hello friends!) which i placed in a jar file.
> the application has the log4j.jar in its lib directory 
> (and classpath) and calls the log4j.logger like this:
> private static final Logger LOGGER = Logger.getLogger(Hello.class);
> It works when i run the application in eclipse.
> but not as a JAR application!(he application is not running 
> on tomcat an is only a smal commandline application)

> Error:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/log4j/Logger

Two questions:

1) What's the name of this mailing list?

2) Was there anything in your description related to Tomcat?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


Re: Optimize CPU Hogging Tomcat 6

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jan,

On 2/2/2011 8:21 AM, jan gestre wrote:
> I already made those changes similar to what is mentioned here -->
> http://spiralbound.net/blog/2008/03/17/rhel-system-configuration-changes-for-oracle-10g,
> it appears that the changes improved the performance, the system no
> longer chokes. However I still want to optimize other settings like
> JVM configuration to further enhance systems performance,
> unfortunately I have where to find the JVM config.

You never told us how you know that your JVM process is the one using
all the CPU time.

If you run out of file descriptors and connections cannot be made, I
would expect that you'd get an app that was doing virtually nothing. If
all your threads are idle, where is the CPU being used?

That error message about having too many open files shouldn't be too
much of a big deal: the server should continue operating and should give
you an error each time your usage peaks such that you accept one-to-many
HTTP connections. You said you only have 30 users, though. What does
netstat show? Do you have lots of lingering connections? How many
request processing threads do you have configured in your <Connector>?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1J6OgACgkQ9CaO5/Lv0PCRegCfVh6bv/kbTKebKQqm8e7Jp+rE
+RYAnj1XNJPXjc7wQA6/b2Uc2FyEcnCc
=TvH/
-----END PGP SIGNATURE-----

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


Re: Optimize CPU Hogging Tomcat 6

Posted by Brett Delle Grazie <br...@gmail.com>.
Hi,

On 2 February 2011 13:21, jan gestre <ip...@gmail.com> wrote:
<snip>
> Hi Olaf and Brett,
>
> I already made those changes similar to what is mentioned here -->
> http://spiralbound.net/blog/2008/03/17/rhel-system-configuration-changes-for-oracle-10g,
> it appears that the changes improved the performance, the system no
> longer chokes. However I still want to optimize other settings like
> JVM configuration to further enhance systems performance,
> unfortunately I have where to find the JVM config.

It depends whether you're using the RedHat supplied (or EPEL) tomcat RPM
or a download from Apache.

(a) downloaded from Apache (I use this):
Read the RUNNING.TXT (for background info).
JVM configuration for Tomcat is usually in setenv.sh which is normally in:
$CATALINA_BASE/bin/setenv.sh
(CATALINA_BASE == CATALINA_HOME by default)

(b) RHEL5 supplied RPM
Environment variables are configured in the file:
/etc/sysconfig/tomcat

In either case, the environment variables you need to set are:
CATALINA_OPTS: used during START only
JAVA_OPTS: used during both START and STOP operations.

Normally JVM heap size, GC logging etc are set in CATALINA_OPTS
since they are only valid on START operations.

The only thing I normally place in JAVA_OPTS is:
-Djava.awt.headless=true and library path (if running on X86_64
systems)

Sample setenv.sh is included below (X86_64, RHEL5, Tomcat 6.0.30) YMMV:

In my configuration I have simple wrapper start/stop scripts that set
the following environment variables prior to calling
catalina.sh start / stop.  This permits multiple Tomcat instances on a
single server.  Very difficult to do with stock RHEL5 Tomcat RPM
CATALINA_HOME=/opt/tomcat6        (points to where binaries are installed)
CATALINA_BASE=/home/tomcat/tc1  (points to instance)
CATALINA_PID=${CATALINA_BASE}/temp/tomcat.pid

-- ${CATALINA_BASE}/bin/setenv.sh --
CATALINA_OPTS="-d64 -Xmx2048m -XX:MaxPermSize=384m \
-Dcom.sun.management.snmp.port=<xxx> \
... other jmxremote / snmp parameters  as needed \
-verbose:gc -Xloggc:${CATALINA_BASE}/logs/gc.log \
-XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps \
-XX:HeapDumpPath=${CATALINA_BASE}/temp \
-XX:+HeapDumpOnOutOfMemoryError \
-Dorg.apache.catalina.startup.EXIT_ON_INIT_FAILURE=true \
-DjvmRoute=jvm1"
JAVA_HOME=/usr/lib/jvm/java
JAVA_OPTS="-Djava.awt.headless=true -Djava.library.path=/usr/lib64"

Good luck!

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



-- 
Best Regards,

Brett Delle Grazie

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


Re: Optimize CPU Hogging Tomcat 6

Posted by jan gestre <ip...@gmail.com>.
On Wed, Feb 2, 2011 at 5:19 PM, Brett Delle Grazie
<br...@gmail.com> wrote:
> Hi Jan,
>
> On 2 February 2011 06:41, Olaf Tomczak <ol...@gmail.com> wrote:
>> Jan,
>>
>> The limit of open files on linux/unix systems for normal users may be
>> quite low by default (for example 1024). From my experience, this may
>> lead to "Too many open files" errors during high load even if your
>> application is working fine. Try increasing this limit, also check
>> your application as Chuck suggested.
>
> Just in case you aren't sure of how to do this on RHEL5 edit:
> /etc/security/limits.conf
>
> You'll want to add a line similar to (assuming 'tomcat' is the user
> running tomcat):
> tomcat hard nofile 4096
> tomcat soft nofile 4096
>
> Adjust the number (4096) as necessary.
>
>>
>> --
>> Olaf
>>
>> 2011/2/2 jan gestre <ip...@gmail.com>:
>>> On Wed, Feb 2, 2011 at 6:26 AM, Caldarale, Charles R
>>> <Ch...@unisys.com> wrote:
>>>>> From: jan gestre [mailto:ipcopper.ph@gmail.com]
>>>>> Subject: Re: Optimize CPU Hogging Tomcat 6
>>>>
>>>>> Here's a snippet of the thread dump using jstack:
>>>>
>>>> Nothing there of any interest; all the ones you showed weren't running and were therefore not contributing to the CPU usage.
>>>>
>>>>> Also, here's my catalina log:
>>>>
>>>>> Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
>>>>> SEVERE: Socket accept failed
>>>>> java.net.SocketException: Too many open files
>>>>
>>>> That looks like something you should take care of...
>>>>
>>>> Is your webapp opening files (or sockets) and failing to close them?  Running out of fd numbers will normally be fatal, and is almost always due to bugs in a webapp.
>>>>
>>>> What's your exact Tomcat version, JDK/JRE level, and platform?
>>>>
>>>
>>> hi chuck,
>>>
>>> Tomcat's version is 6.0.29, Sun Java JDK 1.6.0_21 and RHEL5, webapp is Alfresco.
>>>
>>> Regards,
>>>
>>> Jan
>>>
>
>
>
> --

Hi Olaf and Brett,

I already made those changes similar to what is mentioned here -->
http://spiralbound.net/blog/2008/03/17/rhel-system-configuration-changes-for-oracle-10g,
it appears that the changes improved the performance, the system no
longer chokes. However I still want to optimize other settings like
JVM configuration to further enhance systems performance,
unfortunately I have where to find the JVM config.

Cheers!

Jan

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


Re: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Posted by Pid <pi...@pidster.com>.
On 02/02/2011 09:40, henry human wrote:
> Hi I get the following error when I try to call a smal java application(hello friends!) which i placed in a jar file. the application has the log4j.jar in its lib directory (and classpath) and calls the log4j.logger like this:
> private static final Logger LOGGER = Logger.getLogger(Hello.class);
> It works when i run the application in eclipse.
> but not as a JAR application!(he application is not running on tomcat an is only a smal commandline application)
> 
> Error:
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
> 
> Thanks for your advice

Please do not hijack threads.

When sending an email to the list, start an entirely new email.

Editing the subject & body of a reply to an existing email thread does
not edit or remove the message headers which tie that email to a
conversation.


p

Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Posted by henry human <he...@yahoo.de>.
Hi I get the following error when I try to call a smal java application(hello friends!) which i placed in a jar file. the application has the log4j.jar in its lib directory (and classpath) and calls the log4j.logger like this:
private static final Logger LOGGER = Logger.getLogger(Hello.class);
It works when i run the application in eclipse.
but not as a JAR application!(he application is not running on tomcat an is only a smal commandline application)

Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger

Thanks for your advice



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


Re: Optimize CPU Hogging Tomcat 6

Posted by Brett Delle Grazie <br...@gmail.com>.
Hi Jan,

On 2 February 2011 06:41, Olaf Tomczak <ol...@gmail.com> wrote:
> Jan,
>
> The limit of open files on linux/unix systems for normal users may be
> quite low by default (for example 1024). From my experience, this may
> lead to "Too many open files" errors during high load even if your
> application is working fine. Try increasing this limit, also check
> your application as Chuck suggested.

Just in case you aren't sure of how to do this on RHEL5 edit:
/etc/security/limits.conf

You'll want to add a line similar to (assuming 'tomcat' is the user
running tomcat):
tomcat hard nofile 4096
tomcat soft nofile 4096

Adjust the number (4096) as necessary.

>
> --
> Olaf
>
> 2011/2/2 jan gestre <ip...@gmail.com>:
>> On Wed, Feb 2, 2011 at 6:26 AM, Caldarale, Charles R
>> <Ch...@unisys.com> wrote:
>>>> From: jan gestre [mailto:ipcopper.ph@gmail.com]
>>>> Subject: Re: Optimize CPU Hogging Tomcat 6
>>>
>>>> Here's a snippet of the thread dump using jstack:
>>>
>>> Nothing there of any interest; all the ones you showed weren't running and were therefore not contributing to the CPU usage.
>>>
>>>> Also, here's my catalina log:
>>>
>>>> Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
>>>> SEVERE: Socket accept failed
>>>> java.net.SocketException: Too many open files
>>>
>>> That looks like something you should take care of...
>>>
>>> Is your webapp opening files (or sockets) and failing to close them?  Running out of fd numbers will normally be fatal, and is almost always due to bugs in a webapp.
>>>
>>> What's your exact Tomcat version, JDK/JRE level, and platform?
>>>
>>
>> hi chuck,
>>
>> Tomcat's version is 6.0.29, Sun Java JDK 1.6.0_21 and RHEL5, webapp is Alfresco.
>>
>> Regards,
>>
>> Jan
>>



-- 
Best Regards,

Brett Delle Grazie

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


Re: Optimize CPU Hogging Tomcat 6

Posted by Olaf Tomczak <ol...@gmail.com>.
Jan,

The limit of open files on linux/unix systems for normal users may be
quite low by default (for example 1024). From my experience, this may
lead to "Too many open files" errors during high load even if your
application is working fine. Try increasing this limit, also check
your application as Chuck suggested.

--
Olaf

2011/2/2 jan gestre <ip...@gmail.com>:
> On Wed, Feb 2, 2011 at 6:26 AM, Caldarale, Charles R
> <Ch...@unisys.com> wrote:
>>> From: jan gestre [mailto:ipcopper.ph@gmail.com]
>>> Subject: Re: Optimize CPU Hogging Tomcat 6
>>
>>> Here's a snippet of the thread dump using jstack:
>>
>> Nothing there of any interest; all the ones you showed weren't running and were therefore not contributing to the CPU usage.
>>
>>> Also, here's my catalina log:
>>
>>> Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
>>> SEVERE: Socket accept failed
>>> java.net.SocketException: Too many open files
>>
>> That looks like something you should take care of...
>>
>> Is your webapp opening files (or sockets) and failing to close them?  Running out of fd numbers will normally be fatal, and is almost always due to bugs in a webapp.
>>
>> What's your exact Tomcat version, JDK/JRE level, and platform?
>>
>
> hi chuck,
>
> Tomcat's version is 6.0.29, Sun Java JDK 1.6.0_21 and RHEL5, webapp is Alfresco.
>
> Regards,
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Optimize CPU Hogging Tomcat 6

Posted by jan gestre <ip...@gmail.com>.
On Wed, Feb 2, 2011 at 6:26 AM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>> From: jan gestre [mailto:ipcopper.ph@gmail.com]
>> Subject: Re: Optimize CPU Hogging Tomcat 6
>
>> Here's a snippet of the thread dump using jstack:
>
> Nothing there of any interest; all the ones you showed weren't running and were therefore not contributing to the CPU usage.
>
>> Also, here's my catalina log:
>
>> Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
>> SEVERE: Socket accept failed
>> java.net.SocketException: Too many open files
>
> That looks like something you should take care of...
>
> Is your webapp opening files (or sockets) and failing to close them?  Running out of fd numbers will normally be fatal, and is almost always due to bugs in a webapp.
>
> What's your exact Tomcat version, JDK/JRE level, and platform?
>

hi chuck,

Tomcat's version is 6.0.29, Sun Java JDK 1.6.0_21 and RHEL5, webapp is Alfresco.

Regards,

Jan

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


RE: Optimize CPU Hogging Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: jan gestre [mailto:ipcopper.ph@gmail.com] 
> Subject: Re: Optimize CPU Hogging Tomcat 6

> Here's a snippet of the thread dump using jstack:

Nothing there of any interest; all the ones you showed weren't running and were therefore not contributing to the CPU usage.

> Also, here's my catalina log:

> Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
> SEVERE: Socket accept failed
> java.net.SocketException: Too many open files

That looks like something you should take care of...

Is your webapp opening files (or sockets) and failing to close them?  Running out of fd numbers will normally be fatal, and is almost always due to bugs in a webapp.

What's your exact Tomcat version, JDK/JRE level, and platform?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Optimize CPU Hogging Tomcat 6

Posted by jan gestre <ip...@gmail.com>.
On Tue, Feb 1, 2011 at 10:33 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>> From: jan gestre [mailto:ipcopper.ph@gmail.com]
>> Subject: Optimize CPU Hogging Tomcat 6
>
>> We have an Apache Tomcat 6 server (HA cluster using DRBD) that is
>> hogging the CPU, this happens when there are simultaneous users
>> accessing at the same time, which should be considered normal because
>> they're only 30. How will I optimize Tomcat?
>
> Highly unlikely that you need to optimize Tomcat.  Much more likely that you have a bug in your webapp.  Take thread dumps and see who is spending time where.
>
> http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F
>
>  - Chuck

Hi Chuck,

Here's a snippet of the thread dump using jstack:

Deadlock Detection:

No deadlocks found.

Thread 12288: (state = BLOCKED)
Error occurred during stack walking:

Locked ownable synchronizers:
    - None

Thread 12287: (state = BLOCKED)
Error occurred during stack walking:

Locked ownable synchronizers:
    - None

Thread 12285: (state = BLOCKED)
Error occurred during stack walking:

Locked ownable synchronizers:
    - None

Thread 12284: (state = BLOCKED)

Error occurred during stack walking:

Locked ownable synchronizers:
    - None

Thread 12283: (state = BLOCKED)
Error occurred during stack walking:

Locked ownable synchronizers:
    - None

Thread 12282: (state = BLOCKED)
Error occurred during stack walking:

Locked ownable synchronizers:
    - None

Thread 12281: (state = BLOCKED)
Error occurred during stack walking:

Locked ownable synchronizers:
    - None

----

Also, here's my catalina log:

 tail -f /web/tomcat/tomcat6/logs/catalina.2011-02-01.log
Feb 1, 2011 10:19:04 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
SEVERE: Socket accept failed
java.net.SocketException: Too many open files
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
        at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:352)
        at java.lang.Thread.run(Thread.java:619)

---

Regards,


Jan

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


RE: Optimize CPU Hogging Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: jan gestre [mailto:ipcopper.ph@gmail.com] 
> Subject: Optimize CPU Hogging Tomcat 6

> We have an Apache Tomcat 6 server (HA cluster using DRBD) that is
> hogging the CPU, this happens when there are simultaneous users
> accessing at the same time, which should be considered normal because
> they're only 30. How will I optimize Tomcat?

Highly unlikely that you need to optimize Tomcat.  Much more likely that you have a bug in your webapp.  Take thread dumps and see who is spending time where.

http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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