aspose file tools*
The moose likes Tomcat and the fly likes heap size in apache tomcat 5.x Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "heap size in apache tomcat 5.x" Watch "heap size in apache tomcat 5.x" New topic
Author

heap size in apache tomcat 5.x

Kartik Ruppa
Ranch Hand

Joined: Aug 28, 2002
Posts: 60
Hi,
I wish to set heap size in tomcat server 5.x.Where should I set it and how?
Thanks in advance!
Kartik
Uwe Kubosch
Greenhorn

Joined: Sep 02, 2003
Posts: 2
Originally posted by Kartik Ruppa:
Hi,
I wish to set heap size in tomcat server 5.x.Where should I set it and how?
Thanks in advance!
Kartik

Did you get any answer to this? i'm trying to do the same thing now.
I found that I cat set the JAVA_OPTS environment variable, but I am not sure which JVMs are affected by this.
Im using the Sun JVM, and I guess the default heap size is 64MB. My app is now using 57MB, so I'm fairly close to the limit.
Do all the webapps in Tomcat share the same heap?

donV
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
This really belongs in the Tomcat forum, but anyway. Yes - all servlets in a given Tomcat instance are running in the same memory space. It looks to me like JAVA_OPTS is the options command line to the JVM that executes Tomcat when starting as an application. I don't know how you set the memory opts when starting as a service.
Bill
Mohammad Musleh
Greenhorn

Joined: Nov 12, 2004
Posts: 1
You can increase heap size for tomcat by setting an environment variable for that
1.right click on My Computer icon
2.click properties option
3.click advanced tab
4.click Environment Variables button
5.click New button under System Variables
6.type JAVA_OPTS in the Variable Name box
7.type -Xms512m -Xmx128m in the variable value box
8.click Ok and then Ok and then Ok
enjoy �


Mohammad Musleh<br />Software Architect/J2EE Developer<br />mosleh@yahoo.com
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Moving to Tomcat forum...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5545
    
  13

Originally posted by William Brogden:
This really belongs in the Tomcat forum, but anyway. Yes - all servlets in a given Tomcat instance are running in the same memory space. It looks to me like JAVA_OPTS is the options command line to the JVM that executes Tomcat when starting as an application. I don't know how you set the memory opts when starting as a service.
Bill


if you run it as service, you can make the changes in the service.bat file. e.g.


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
 
 
subject: heap size in apache tomcat 5.x