Problems running Java JVM in openvz container

yatesco

Well-Known Member
Sep 25, 2009
211
5
58
Hi,

I am running into JVM out of memory errors (error=12) when I try and run JIRA or Fisheye in an openvz container.

The container has 2GB of RAM allocated and the host has 4GB (free), but regardless of what I set the options to be I keep getting an out of memory error.

Posts like http://proxmox.com/forum/showthread.php?t=1495&highlight=java help explain the problem, but doesn't (unless I miss something) point out the solution.

So has anybody managed get around this problem? I have read about the beancounters and think I understand what they are telling me, I just don't know how to fix it.

Creating a KVM machine works fine, but because of some silly thing with my firewall the KVM cannot connect to the openvz containers (even though they are all on the same network with shorewall on the host :(

Any help gratefully received.
 
I am running into JVM out of memory errors (error=12) when I try and run JIRA or Fisheye in an openvz container.

You already tried overriding Java's memory defaults?

Posts like http://proxmox.com/forum/showthread.php?t=1495&highlight=java help explain the problem, but doesn't (unless I miss something) point out the solution.

The solution is to tune the java memory settings - but I never tried that myself.

So has anybody managed get around this problem? I have read about the beancounters and think I understand what they are telling me, I just don't know how to fix it.

tuning beancounters does not help here at all.
 
You already tried overriding Java's memory defaults?
Yep.

I created a container with 1024MB RAM and then set the following JAVA_OPTS: -Xmx256m -Xmx256m, but I kept getting the same error.

I figured out why my KVM machines cannot talk to the containers (I am using shorewall and had only indicated one of the network devices was bridged) so I will go with that.

I understand that memory ballooning will be in the next upgrade so this will mean my greedy KVM won't take all 1024M of RAM if it isn't actually using it - is that right?