tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: heap memory issues
Date Mon, 18 Jun 2012 07:52:01 GMT
2012/6/16 Miguel González Castaños <>:
> 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.

4 Gb is memory size?

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

Do you need to keep 10k of them in the memory at the same time?
Usually one would send mails one by one and release their memory

>  The settings we have now for the JDK are:
> -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.

GC? Or OS memory swapping?

>  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

64-bit JVM usually needs more memory than 32-bit one,  because memory
address range is wider and pointers need more memory.

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message