tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Echerer <m...@tngtech.com>
Subject Re: OutOfMemory Errors
Date Thu, 16 Dec 2004 06:55:03 GMT
Hi,

another idea... try to increase the size of the perm heap with 
-XX:permSize and -XX:maxPermSize. (See the JVM and garbage collector 
tuning docus from Sun for more information and google for more). Also 
try to enable the garbage collector log to check what happens to the 
perm memory in case of GCs.
AFAIK the maxPermSize can be set fairly high, because it will be cut off 
your -Xmx setting, just when needed.
We had a similar issue because the perm size was limited to/reached 64mb 
and at some point during runtime everything broke apart as we need about 
100MB. Interesting: using the -d64 -server crashed already during Tomcat 
startup with too low perm size. Obviously the classes and all other perm 
memory code need more heap right from the beginning due to 64bit addressing.

Unfortunately having not enough perm memory here can lead to out of 
memory exceptions although you seem to have enough free heap. ;-)
Somebody at Sun forgot to offer a Java 1.4.x method to dump the free 
perm memory besides max, total and free heap that you could easily find 
out whats wrong without GC logging...

Cheers,
Michael

Asim Alp wrote:
> Hello Peter,
> 
> Sorry.  My system config is:
> 
> Windows Server 2003
> Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6
> Tomcat 5.5.4
> sun jdk 1.5.0-b64
> 
> We have a 2 node tomcat cluster each running with the -Xms128m
> -Xmx1024m options.
> 
> We have a heavily loaded JDBC application running and our MySQL server
> has enough max_connections to handle our load.  For now, we have
> Apache, one of the Tomcats and MySQL running on the same machine (2 x
> 3.8 Ghz Intel with 2GB of Ram).  We're also using this server as a
> file server with RAID 5.
> 
> From Task Managers performance monitor, I'm looking at the Handles (I
> hope I'm looking at the correct thing).  Total number of handles is
> around 30400 (almost two times 16K).  Apache is usually using about
> 3000, Tomcat 5000, MySQL 9000, System 2600, svchost 1000.
> 
> Do these values look normal?
> 
> Asim
> 
> On Mon, 13 Dec 2004 17:53:35 -0000, Peter Crowther
> <Peter.Crowther@melandra.com> wrote:
> 
>>>From: Asim Alp [mailto:asimalp@gmail.com]
>>>I'm trying to solve an OOME on our Tomcat.
>>
>>Tomcat version?
>>JVM version and settings?
>>Application characteristics?
>>Other libraries in use (eg JDBC)?
>>
>>
>>>We profiled our
>>>application using JProfiler and there are no memory leakages on our
>>>end.  Currently, I'm focusing on some system resource problems such as
>>>file descriptors.  Would this be a valid problem on Windows Server
>>>2003?  And if so, how can I change the max number of file descriptors?
>>
>>I suspect someone else will give a better Java solution, but I'm a
>>Windows hack who's a relative latecomer to Java...
>>
>>You've got 16k to go at by default.  How many are you using, according
>>to Performance Monitor?  And how many in the JVM running Tomcat?
>>
>>
>>>One last thing...  What other resources should I investigate for this
>>>sort of OOME?
>>
>>http://www.sysinternals.com/ for 'handle' and Process Explorer if you
>>suspect a resource problem on Windows.
>>
>>                - Peter
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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


Mime
View raw message