Apache Tomcat & Tomee Max Heap memory space and Max Permgen space in setenv.sh

In windows, create file setenv.bat in \bin\ folder:

set CATALINA_OPTS=$CATALINA_OPTS -server -Dfile.encoding=UTF-8 -Xms128m -Xmx6248m -XX:PermSize=64m -XX:MaxPermSize=256m

In linux create file setenv.bat in /bin/ folder:

export CATALINA_OPTS="$CATALINA_OPTS -server -Dfile.encoding=UTF-8 -Xms128m -Xmx6248m -XX:PermSize=64m -XX:MaxPermSize=256m"

With jmx configurations:

export CATALINA_OPTS="$CATALINA_OPTS -server -Xmx6000m -Xms512m -XX:MaxPermSize=400m -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9229 -Djava.rmi.server.hostname=190.57.138.218 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
export JAVA_OPTS="-client -Xms8m -Xmx128m -XX:MaxPermSize=64m -Djava.net.preferIPv4Stack=true"
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s