Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 37 other followers
After looking around a bit, here is how I learned to configure heap size for Tomcat 6.x:
export CATALINA_OPTS="-Xms1024m -Xmx1024m"
Thanks to this post for the information.
does this work on a win2003 box with tomcat starting as a service ?
How to set java heap size in Tomcat?
Stop Tomcat server, set environment variable CATALINA_OPTS, and then restart Tomcat. Look at the file tomcat-install/bin/catalina.sh or catalina.bat for how this variable is used. For example,
set CATALINA_OPTS=”-Xms512m -Xmx512m” (Windows)
export CATALINA_OPTS=”-Xms512m -Xmx512m” (ksh/bash)
setenv CATALINA_OPTS “-Xms512m -Xmx512m” (tcsh/csh)
In catalina.bat or catallina.sh, you may have noticed CATALINA_OPTS, JAVA_OPTS, or both can be used to specify Tomcat JVM options. What is the difference between CATALINA_OPTS and JAVA_OPTS? The name CATALINA_OPTS is specific for Tomcat servlet container, whereas JAVA_OPTS may be used by other java applications (e.g., JBoss). Since environment variables are shared by all applications, we don’t want Tomcat to inadvertently pick up the JVM options intended for other apps. I prefer to use CATALINA_OPTS.
Yes, but doesn’t JAVA_OPTS override CATALINA_OPTS?
Hi Abid / Dave,
I’m very new to this setting JAVA_OPTS variable.
Please can you explain in detail.
Stepwise proc for configuring
for linux machines as well(not much aware about the linux commands aswell)
–one more question :
1) If i have two tomcat application running on my windows XP ,does this JAVA_OPTS
size apply for both, if yes how to make it specific for each application.
2)what does Xms and DXms stand for.
Thanks in advance
Thanks for sharing your HOW-TO.
To set the
property in the catalina.sh or catalina.bat file, i should find these files firstly These files do not exist in my Tomcat 6 directory:
C:\Program Files\Apache Software Foundation\Tomcat 6.0\
How will I configure the heap size ?
Look in the bin directory inside tomcat directory.
If I can suggest you something, next time do a research with find (linux) or CTRL F (windows).
yes u r rite same prblm wth me also…..
To set the
The above property in startup.bat file while is available in tomcat\bin directory path.
To set the below comment in startup.bat file as
set CATALINA_OPTS=”-Xms1024m -Xmx1024m”
startup.bat file is available in tomcat\bin directory path.
I want to configure the heap size in tomcat 6.0.
In my tomcat directory i dont have the catalina.sh or catalina.bat file.
How can i configure in this situation.
Thanks in Advance…
Hi jaypee, did you solve this problem?, if yes….. how?
1. I Recorded the Script for Company creation and User creation. When executing the Script it is displaying error message like “java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source)”
How we can solve this Problem
2. Can u send me the process how to Insert the Data in DB by using JMeter.
3. In JMeter how many Vusers we can create
I am using Window-XP. i make changes both in catalina.sh or catalina.bat but i think tomcat 6.0.14 not using those file.
Kindly tell me how i increase my tomcat heap memory.
You can set in starttomcat as mentioned in http://hiox.org/index.php?id=443
Thanks you so much ..i really spent a lot time on this but at many places it was not mentioned how exactly n where to place these arguments…cheers
what about how to solve java heap space errror in my tomcat i am using Ubuntu OS and everytime when i try to load a module in tomcat it’s shows the java heap space, need some help please
Thanks for it, I was looking for it quite a while.
Does anyone know what would be the minimum java heap size for Tomcat? Will tomcat run for example with only 48MB?
For Windows, create a new file setenv.bat and put the following into the file:
set JAVA_OPTS=-XX:MaxPermSize=512m -Xms512M -Xmx1024M %JAVA_OPTS%
Hi mingliangfeng, In my tomcat directory I don’t have the catalina.sh or catalina.bat file, however I can create the file setenv.bat, the question is: where do I invoque this file in the startup process?
more of a tweet than a full blog entry, and the comments are 10x the size of the “post”.
I was actually searching to find out why tomcat 6 seems to leak so much memory and crash our servers.
Even i tried increasing the size It aint worked out . Then what is the other procedure to follow ? can anyone help out with this java heap space issue. thanks in advance.
Hmmm i too need the alternative
to increase the heap memory size in tomact: tomact6.0->bin->startup.bat(rightclick->edit) and set like “set JAVA_OPTS=-Xmx512m -XX:MaxPermSize=256m”
to increase heap size for tomcat
For windows os :MyComputer->properties->Advanced->environment variables->System variables->New->Variable name:CATALINA_OPTS->Variable value:-Xms64m -Xmx256m
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
Connecting to %s
Notify me of follow-up comments via email.
Get every new post delivered to your Inbox.