Professional Documents
Culture Documents
Tomcat runs as a deamon under Linux or application/service on Windows. Depending on your setup and operating setup please find the instructions to set the memory for Tomcat. By default, Tomcat sets its own memory size at around 64MB which by far this is not enough for web applications. You can set the "start size", the "maximum size" and you also need to up the heap space. to find out the proper values for your platform you will need to issue the command "java -X" in the terminal. -Xms<size> set initial Java heap size -Xmx<size> set maximum Java heap size -Xss<size> set java thread stack size Once you know your parameters you should allocate about 80% of your available Ram to Tomcat.
Increase Memory
Linux
To set the memory you should have a file called "setenv.sh" in your /tomcat/bin directory. If the file does not exsist you should create it. Within the file set the parameters like;
export JAVA_OPTS="-Xms256m -Xmx512m"
JvmMx, which is the "maximum memory" setting. Double-click JvmMx to edit, change the Base to "Decimal" and adjust the value as necessary.
To increase the level of this memory another java parameter will need to be added:
-XX:MaxPermSize=128m
Linux
As explained above all these settings take place in the setenv.sh. Add the following now;
export JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=128m"