• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

heap size in apache tomcat 5.x

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 �
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Tomcat forum...
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic