I want to increase the heap size of my Glassfish. For this, I know that I can go up to 4 GB:
java -Xmx4000M -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
I tried to set -Xmx to 2GB in the domain.xml file:
<jvm-options>-Xmx2000m</jvm-options>
But I get the following error:
asadmin> start-domain Waiting for ... to start .Error starting domain ... The server exited prematurely with exit code 1. Before it died, it produced the following output: Error occurred during initialization of VM The size of the object heap + VM data exceeds the maximum representable size launchctl bsexec failed: Inappropriate ioctl for device
Running the command with the -v option gives the following:
12 oct. 2011 11:46:34 com.sun.enterprise.admin.launcher.GFLauncherLogger info INFO: JVM invocation command line: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -XX:+UnlockDiagnosticVMOptions -XX:MaxPermSize=512m -XX:NewRatio=2 -XX:+CMSClassUnloadingEnabled -Xmx2000m -Xms1000m ... 12 oct. 2011 11:46:35 com.sun.enterprise.admin.launcher.GFLauncherLogger info INFO: Successfully launched in 45 msec. Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. Command start-domain failed.
source share