Set tomcat memory heap size

when you are using tomcat as you application server for not small application you can easy get (out of memory exception). this is because the default heap size tomcat use is small and suitable only for small web applications.

to set the start and maximum heap size run the following command before starting your tomcat:

export CATALINA_OPTS=”-Xms1024m -Xmx1024m”


export JAVA_OPTS=”-Xms1024m -Xmx1024m”


go to the tomcat_HOME/bin/ find the JAVA_OPTS parameter and modify to JAVA_OPTS=”-Xms1024m -Xmx1024m”

this will create environment variable called CATALINA_OPTS  or JAVA_OPTS contains the required options to make tomcat start heap size 1024M and maximum heap size 1024M.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s