There are two uses of "virtual machine" here.  I'll distinguish the Java
virtual machine and the Xen virtual machine.

On 30 March 2010 16:29, Eric Laflamme <elafla...@iweb.com> wrote:

> We have a lot of server using virtualization (xen source) and we have a lot
> of problem with tomcat. Tomcat process seems to stop responding after
> undetermined time and write in loop this in the catalina.out:
>
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
>

OK, so that's the Java virtual machine running Tomcat not being able to
extend its heap.

Is Tomcat running inside a Xen VM?  If so, how much memory is allocated to
the Xen VM?

>
> The servers has 32 gig of ram so it's not the ram that is in need.


*Which* server?  The host for your Xen virtual machines, or a particular Xen
virtual machine?


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

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

- Peter

Reply via email to