wood burning stoves*
The moose likes Tomcat and the fly likes Box running out of memmory and tomcat doesn't use swap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Box running out of memmory and tomcat doesn Watch "Box running out of memmory and tomcat doesn New topic
Author

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

Will Sterling
Greenhorn

Joined: Dec 01, 2003
Posts: 6
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.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
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

Joined: Dec 01, 2003
Posts: 6
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
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Box running out of memmory and tomcat doesn't use swap
 
Similar Threads
instance initializer variable question
JRE version problem
wrapper classes
memory leak ??!!
URGENT: help with jdk version