0

I am using tomcat 6 and the WAR file I have deployed is giving me out of memory error. I have installed tomcat6 using windows installer because of it I am unable to find any catalina.bat in tomcat6.0\bin folder where I can configure CATALINA_OPTS variable.

Sparkplug
  • 485
  • 7
  • 21

2 Answers2

0

If you have trouble setting CATALINA_OPTS in tomcat installation, you can set it as a environment variable in windows.

UPDATE:

If the previous method is not working then you can create a file, setenv.bat in bin directory of tomcat.

And in that file you can put the arguments like:

 set CATALINA_OPTS= "JVM Conditions here"

This did the trick for me, try it out.

Few links for your reference:

http://www.oracle-base.com/articles/misc/apache-tomcat-7-installation-on-windows.php

How to tune Tomcat 5.5 JVM Memory settings without using the configuration program

Community
  • 1
  • 1
Himanshu Bhardwaj
  • 4,038
  • 3
  • 17
  • 36
0

If you are not able to find the catalina.bat then edit your tomcat6w.exe and add

-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:+UseConcMarkSweepGC
-XX:PermSize=128m
-XX:MaxPermSize=512m 

You should change the “Xms” and “PermSize” value base on your server capability.

Once done with editing simply Restart Tomcat.

Hope it helps!

Juned Ahsan
  • 67,789
  • 12
  • 98
  • 136