Tomcat 7: How to set initial heap size correctly?
Use following command to increase java heap size for tomcat7 (linux distributions) correctly:
echo 'export CATALINA_OPTS="-Xms512M -Xmx1024M"' > /usr/share/tomcat7/bin/setenv.sh
You might no need to having export, just add this line in catalina.sh :
CATALINA_OPTS="-Xms512M -Xmx1024M"
You must not use =
. Simply use this:
export CATALINA_OPTS="-Xms512M -Xmx1024M"