Eric Laflamme wrote:
...

We tried to specifiy the memory for tomcat like:

-Xmx1024M
-Xms512M

But nothing seems to help. Does anybody have any ideas for this behaviour?

Keep -Xms and -Xmx the same.  If you do that, Java will allocate all the
heap as it starts.  You will either get a failure at startup (which is
easier to deal with) or the heap memory will be allocated.

We try all kind of allocation and the problem isn't showing at startup.. It 
happen only after few hours. If this can help, it can happen on a server that 
doesn't contain any data.. A fresh install of Cpanel and after few hours, it 
can happen..

As you have found, allowing Java to grow its heap while it is running causes
problems when another process is using memory.

- Peter

I always  restart tomcat when adding heap memory..

Independently of the rest of the issue, I think that what Peter was telling you, is to use for example : -Xms1024M -Xmx1024M
In other words, keep these two parameters equal.
That will cause the JVM to allocate the 1024M to the heap right at the beginning, and keep the heap always at the same size.
Otherwise :
1) the JVM which runs Tomcat will start with 512M for the heap, but may have a problem later, when it needs more, tries to get it from the Xen VM where it is running, and (maybe) cannot get it then. 2) when the two parameters are not equal, the JVM regularly tries to "adjust" the size of the heap dynamically. This costs some performance.
When the parameters are equal, this dynamic adjustment work does not happen.

Another question : are all the components which are involved here, capable of using 32 GB of RAM ? I don't know what exactly matters here, but maybe there are 32/64 bit issues somewhere.




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

Reply via email to