[jdom-interest] OutOfMemoryException

David Kavanagh dak at dotech.com
Wed Aug 14 19:33:40 PDT 2002


There are 3 ways I can think of.

1. Set the environment variable TOMCAT_OPTS (or CATALINA_OPTS for tomcat 
4.x) to the commandline options that will increase the memory. try "set 
TOMCAT_OPTS="-Xms128m -Xmx128m". That will lock down 128M for the JVM. I 
think it has an upper limit of 64M by default, but starts much smaller.
2. You can write a wrapper script that sets the TOMCAT_OPTS variable, 
then calls tomcat.sh (or catalina.sh) for you.
3. you can modify tomcat.sh (or catalina.sh) by setting the environment 
variable right in the script itself.

I've used option 1 and 3 before. On the tomcat user list, the perferred 
option seems to be #2.

David

Mastrorillo Laurence wrote:

>Hi all,
>i have a servlet using jdom to generate XML files and i very often get
>an OutOfMemoryException.
>saw on jdom FAQ that it is possible to increase a JVM's memory size, but
>how can I do that on tomcat?
>thanks
>ll
>
>_______________________________________________
>To control your jdom-interest membership:
>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
>





More information about the jdom-interest mailing list