Bootstrap FreeKB - Tomcat - JVM Arguments (setenv.sh)
Tomcat - JVM Arguments (setenv.sh)

Updated:   |  Tomcat articles

The most common way to change the startup/runtime settings for a Tomcat application server is to create the setenv.sh file at <tomcat home>/bin/setenv.sh.

touch /opt/tomcat/bin/setenv.sh

 

And to then append options to setenv.sh. In this example, the heap size is set to 512 MB.

JAVA_OPTS="-Xms512m -Xmx512m"

 

Restart Tomcat for this change to take effect.

/opt/tomcat/bin/shutdown.sh
/opt/tomcat/bin/startup.sh

 

The ps command can be used to confirm that Tomcat is using the options listed in setenv.sh.

ps -ef | grep -i tomcat

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 9fc298 in the box below so that we can be sure you are a human.