Splitting your Tomcat installation for more power

The most basic setup of Tomcat involves unzipping the distribution files somewhere on your system, dropping your application into the webapps directory, and firing the server up. This is a fine quick start to run a single app on your own machine, but Tomcat offers a much more powerful way to organize production servers and complex developer setups.

If you read down a ways in the RUNNING.txt file in the tomcat installation bundle, you’ll find a section called “Advanced Configuration - Multiple Tomcat Instances”. This describes how to split your Tomcat installation into two directories, the $CATALINA_HOME directory for the Tomcat installation files, and the $CATALINA_BASE directory with the runtime files. Setting these two environment variables when you start up Tomcat controls where the server will look for its files.

Raible adjusts his max perm size

Matt Raible has found that the latest version of his application stack needs a larger perm size set in the JVM than the default. Tweaking the memory settings of the JVM is becoming more complex than just setting the starting and maximum heap sizes. One of the things on my to-do list is to come up with a set of instructions for running Tomcat (or other app servers) with JMX enabled, and using this to analyze the different sections of JVM memory and adjust your startup parameters appropriately.

Syndicate content