Search code examples
javatomcat8

Want to allocate more memory to Tomcat but catalina.sh is missing


I am running a Tomcat8 server on linux (RedHat). The machine it runs on has a total of 15GB Ram of which i want to allocate 11GB to the tomcat server. Currently it only has 3.3GB avaialable for use.

I have openjdk 64 bit installed.

I am trying to set CATALINA_OPTS to -Xms512M -Xmx11g and the JAVA_OPTS to -d64 -Xms256m -Xmx12g.

I found several how-to's saying something about a setenv.sh or catalina.sh both of which I cannot find: neither under tomcat8/bin, catalina_home or catalina_base which both point to /root.

So how do I increase available memory for my Tomcat server?

Thanks!


Solution

  • It seems that catalina.sh is either no longer existent in the latest tomcat release or it has something to do with the fact that i am using a amazon vm and they have some kind of modified tomcat8 distribution what i would doubt.

    Solution: under usr/share/tomcat8/conf/ there is a tomcat8.conf file. Adding the row JAVA_OPTS="-Xms1g -Xmx12g" did the trick.

    UPDATE: Please check the comments below this post