tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Rowles <JRow...@ordsvy.gov.uk>
Subject RE: Known Memory clean-up issues?
Date Fri, 30 Nov 2001 14:57:26 GMT
> 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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message