• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 13139
  • Last Modified:

Tomcat - Increasing memory

Hello,

I have Tomcat 4.1.30 and I was asked to increase the memory.  I read somewhere that to do that just add a parameter to CATALINA_OPTS.  I run Tomcat as a Windows 2003 Service (yes, it's the server version).  Can I just add CATALINA_OPTS environment variable in Windows (none exists now!)?  What would be the syntax for this?  Is there another way to do it via any control panels?  I looked in the admin and saw nothing.  After I increase the value is there any way to see that it took place?  

The following is the line in catalina.bat.  Perhaps this is where I can change it?  

%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

I would like to increase to at least 512 (I assume the default is 256).  Can someone give me the exact syntax for this?

Thanks
0
James Cochrane
Asked:
James Cochrane
1 Solution
 
ramazanyichCommented:
The simpliest way is to add that parameter to your catalina.bat:
%_EXECJAVA% %JAVA_OPTS% -Xmx512Mb %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

I just added -Xmx512Mb
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now