tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel González Castaños <miguel_3_gonza...@yahoo.es>
Subject Re: heap memory issues
Date Sat, 16 Jun 2012 10:55:59 GMT



On 16/06/2012 12:49, Miguel González Castaños wrote:
> Dear all,
>
>    We have a webapp under Tomcat 5.5 and jdk 1.5 32 bits under a 
> virtual machine of 4 Gb and a 64 bits OS.
>
>    Some of you have helped me suggesting me to install Javamelody and 
> sar to monitor the system. Setting up heap dumps I have managed to see 
> what was going on with the eclipse memory analyzer.
>
>    The webapp sends emails that have been previously entered into the 
> database. It loads the emails into memory, so if you are sending 10k 
> emails, it loads 10k objects containing those emails. That makes the 
> app to use around 200-300 mb of the heap memory.
>
>   The settings we have now for the JDK are:
>
>   CATALINA_OPTS="$CATALINA_OPTS -XX:+HeapDumpOnOutOfMemoryError 
> -XX:HeapDumpPath=/opt/tomcat5/logs/ -Xms128m -Xmx512m -verbose:gc 
> -XX:+PrintGCTimeStamps -XX:+PrintGCDetails"
>
>   Facts that I have witnessed:
>
>   If I try to increase the Xmx to 740m or 1024m the GC starts working 
> very much and Tomcat shuts down.
>
>   I have also tried downloading a 64 bits 1.7 jdk but I get the typical:
>
>   Java HotSpot(TM) 64-Bit Server VM warning: Exception 
> java.lang.OutOfMemoryError occurred dispatching signal SIGTERM to 
> handler- the VM may need to be forcibly terminated
>
>   It doesn't matter if i set the maxperm memory to 512m or I increase 
> the Xms and Xmx beyond 1024m, it breaks after 5-10 minutes without 
> doing anything.

Also from the heap dumps I have realized that javamelody objects are 
consuming around 100Mb, so I have undeployed it to get at least more 
heap memory.

Miguel

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


Mime
View raw message