newBee newBee - 18 days ago 7
Java Question

Java Tomcat8 - allocate more memory; catalina.sh 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 tried to set the

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 which i both cannot find. It is not under
tomcat8/bin
and catalina_home as well as catalina_base both point to /root.

So how do I increase the max. avaialable memory for my tomcat server?

Thanks!

Answer

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.

Comments