You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tuan Quan <tu...@yahoo.com> on 2008/06/16 18:11:12 UTC

Memory usage in Tomcat 6

Hi all, how do I adjust Memory allocation Tomcat 6, running as service in Windows? I ran into "out of memory" error.
thanks.

RE: Memory usage in Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tuan Quan [mailto:tuan_quan@yahoo.com]
> Subject: Memory usage in Tomcat 6
>
> Hi all, how do I adjust Memory allocation Tomcat 6, running
> as service in Windows?

Use the tomcat6w.exe program in Tomcat's bin directory.

Read the FAQ for memory usage information:
http://wiki.apache.org/tomcat/FAQ/Memory

JConsole (part of the HotSpot JVM SDK) is a good tool for monitoring memory usage on the fly.

 - 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 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


RE: Memory usage in Tomcat 6

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Billy Ng [mailto:billyng.tomcat@gmail.com]
> Subject: Re: Memory usage in Tomcat 6
>
> Changing the -Xms<n>m and -Xmx<n>m in the tomcatw.exe

That's tomcat6w.exe, not tomcatw.exe.

> If you still have problem, there must be some huge
> objects created from time to time.

It can also be PermGen space (classes) that is full, rather than the normal heap.  Other resource exhaustion (e.g., file handles) can also cause OOMEs on occasion.

> You need to use tool like figure it out.

Yes, a profiler - or even JConsole - is very useful here.

 - 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 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


Re: Memory usage in Tomcat 6

Posted by Billy Ng <bi...@gmail.com>.
9 out of 10 are the heap size problem.  Changing the -Xms<n>m and -Xmx<n>m 
in the tomcatw.exe if you are using Windows.  On the 32-bit Windows, you can 
only allocate 1.2 GB max.  If you still have problem, check all the static 
vars to see any objects are growing forever.  If you still have problem, 
there must be some huge objects created from time to time.  You need to use 
tool like figure it out.

Billy Ng

----- Original Message ----- 
From: "Tuan Quan" <tu...@yahoo.com>
To: <us...@tomcat.apache.org>
Sent: Monday, June 16, 2008 9:11 AM
Subject: Memory usage in Tomcat 6


> Hi all, how do I adjust Memory allocation Tomcat 6, running as service in 
> Windows? I ran into "out of memory" error.
> thanks. 


---------------------------------------------------------------------
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