• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

heap size in apache tomcat 5.x

 
Kartik Ruppa
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 �
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Tomcat forum...
 
Roel De Nijs
Sheriff
Posts: 9790
101
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic