tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Increasing Heap Size and Max Perm Size
Date Wed, 19 Aug 2009 21:30:21 GMT
Daniele Development-ML wrote:
> Found a solution here:
> <>Practically,
> everything works when setting the above options through CATALINA_OPTS
> variable.
a solution found here or there may work, and may still be a bad solution 
from an overall point of view.
Modifying means that at the next Tomcat update, it will 
probably be lost, and you will wonder why "something that worked with 
Tomcat 6.0.18 does not work anymore with 6.0.20, but I haven't changed 
anything  !".
The best place to set environment values is the Tomcat/bin/ 
(create if not there), which does not get overwritten by a new Tomcat 
version, and is called (if it exists) by, here :

if [ -r "$CATALINA_BASE"/bin/ ]; then
   . "$CATALINA_BASE"/bin/
elif [ -r "$CATALINA_HOME"/bin/ ]; then
   . "$CATALINA_HOME"/bin/

Now, in order to really see what happens, you need, on your platform, to 
look first at the script which starts Tomcat, probably /etc/init.d/tomcatxx.
This script will do some setup, then probably call 
(tomcat_home)/bin/, which in turn calls 
Tomcat_home/bin/, which in turn calls 
(tomcat_home)/bin/ if it exists.
read those scripts, understand what they are doing and when, and then 
put your environment vars in the right place.
You cannot rely on some receipe written by someone on some forum for 
some particular situation, or on some receipe found in a book that was 
written 5 years ago for a version of Tomcat since unsupported.

There is a standard file in the Tomcat distribution called 
"RUNNING.txt".  On my Debian system, it is in (tomcat_home)/docs. 
Depending on your Linux version, it may have been moved somewhere else.
Regardless, it is a good place to start.
In my Debian distribution, there is also, at the same location, a file 
called README.Debian, which explains in some detail how the Debian 
packager for Tomcat re-organised the Tomcat files, so that they fit 
better in the general Debian host setup logic.
I would assume other distributions do the same.
Read these files, they are full of precise and logical information.

Unless you understand how it all works together, you are condemned to 
re-live the same kind of problems again each time you make a change, 
because you will probably make it in the wrong spot.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message