tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seb B" <sebb94...@hotmail.com>
Subject memory problems with Tomcat 4.0.4
Date Thu, 17 Oct 2002 01:40:07 GMT
Hi,

We are experiencing OutOfMemory errors which could be linked to
Tomcat keeping objects in memory about past transactions or
clients.

We're working on migrating an application from IPlanet to Tomcat.

Everything works great in our testing lab, but if we add it in
the load balancer pool alongside our live servers it eventually
exhausts all memory from its heap.

Our java options are "-Xms 704m -Xms704m". We're capturing free
heap size at short intervals and monitoring this over time. To
make the measurement more relevant to live objects, we're calling
the garbage collector explicitly every 5mn.

At process start-up, 200MB of the heap is in use.

We've conducted the following experiments:
- if we keep sending traffic, heap usage will grow up to the
maximum, then throw OutOfMemory errors. This can happen after 1~2
hours of traffic. The more load we apply, the faster we get to
the breaking point.
- if we stop sending traffic to it before it gets too close to
run out of memory, memory usage goes back down over time to
200MB. So what we're seeing is not a memory leak in the sense
that whatever objects are filling up the heap do eventually die
and get garbage collected. But they take a long time to die:
100MB of objects are recovered in the first few minutes without
traffic, but it then takes up to 2 hours for the process to get
back to its 200MB heap usage.
- after the memory usage has gone down like this, we can start
sending traffic again, and heap memory usage will again increase
towards the maximum, until either it runs out of memory or we
take it offline and memory usage falls back down.

This looks like something is keeping around objects linked to
past transactions or connections. Our application is not supposed
to keep state about past transactions, and doesn't exhibit this
behaviour when running in IPlanet. Also, this doesn't happen in
the testing lab, where the client IP addresses set is very
limited. So I am wondering whether any part of Tomcat could be
keeping objects on a per-client basis even after connections have
been closed.

Our application doesn't use sessions, but just to make sure we
modified server.xml to specify a 1mn expiration on the
StandardManager. We had access logging enabled (lookups
disabled), but also disabled that.

We've seen this using both Sun's 1.4.1 jdk and IBM's 1.3.1 jre.
We are considering upgrading to 4.1.12, but don't know whether
this will fix the problem.

We're also going to run it with "-verbose:gc", and see whether it
gives us any additional information.

Does anyone know what this could be, whether it affects 4.1.12
too, or how to work around it ?

Any help is greatly appreciated. Thanks,

Seb






--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message