• 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

Box running out of memmory and tomcat doesn't use swap

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm running tomcat 4.1 on Red Hat 7.2 with java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)from Sun. The box has one Gig of memory in it and Tomcat takes up all the available memory on the box until the point that is can no longer serve pages but never uses the one gig of swap available. I have added another gig of physical memory to all the servers so it's no longer a problem right now but I'm afraid as we add more sites it may fill up the 2 gigs and be a problem again. Where should I look to figure out why it is not using the available swap? Oh and other applications running on identical hardware with the OS installed from the same kickstart use swap just fine.
 
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
It is the JVM that controls use of swap space, Tomcat does not have that kind of control. Why are you using the client JVM instead of the server JVM? What memory settings are you using to start Java?
Bill
 
Will Sterling
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not made any changes to JAVA_CMD in tomct4.conf so it should be using it's default values. I downloaded the java binary from sun the developer asked for. I didn't know there were different client/server versions.
 
William Brogden
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
There are important command line memory usage parameters that can be optimized for Java application like Tomcat. For example - with typical Linux
defaults, the JVM will throw an OutOfMemoryError after using 64MB of memory.
You need to get the Java SDK Documentation and study the tools.html file.
Bill
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic