I was trying to adjust initial heap size of a tomcat 7 (CentOS, java -version: 1.6.0_25-b06) instance by adding the following line to catalina.sh:
export CATALINA_OPTS="-Xms=512M -Xmx=1024M"
Starting up tomcat fails and logs the following message to catalina.out:
Invalid initial heap size: -Xms=512m Could not create the Java virtual machine.
What is wrong with these options?
By default, the maximum heap size value is 256 MB.
64 bit JVM installed on Solaris machines runs with a 32-bit model if you don't specify either -d32 or -d64, which won't accept a Maximum heap size of 4GB, hence "invalid heap size". You can resolve this issue by running Solaris JVM with option -d64.
You must not use =
. Simply use this:
export CATALINA_OPTS="-Xms512M -Xmx1024M"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With