You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Justin Rowles <JR...@ordsvy.gov.uk> on 2001/11/30 15:57:26 UTC

RE: Known Memory clean-up issues?

> I checked my servlet code.  It only allocates local variables 
> within the
> request methods.  So the JVM should be cleaning them up but it isn't.
> If I let my test run long enough, I can cause an OutOfMemory exception
> to be thrown by Tomcat.

I logged memory usage on our system and graphed it.  It went down to zero in
a nice straight line and then the jvm started throwing outofmemory
exceptions and all sessions got 500 errors...

> Any harm in forcing garbage collection to run?

...then I wrote a routine that calls system.gc() if the free/total is less
than 20% and called it at the end of request processing.  Now everything is
fine and the graphs are really pretty dogtooth shapes.

So: log, log and log again.  Call System.gc() if you calculate that you need
to, but tuning the jvm may be a better long term solution.

NOW, does anyone know when the damn jspDestroy method should be invoked?!
PLEASE!

Justin.
-- 
You're only jealous cos the little penguins are talking to me. 



***************************************************************
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***************************************************************




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>