tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynir Hübner <>
Subject [partially off topic] How can I detect java.lang.OutOfMemoryError
Date Tue, 15 Apr 2003 15:48:36 GMT

I am trying to find a good way to detect and handle java.lang.OutOfMemoryError. 
There are obvious problems to this, if this error occures the VM is basically "crashed" but
not dead, it cannot allocate more memory. 

I would like to handle such errors by sending an email to the system administrator and restarting
the service running tomcat, and maybe even add few megabytes to the Xmx JVM parameter. 

Just for the record, I know what causes the OutOfMemoryError, and it's not really an error
or anything, it's just pure load, and of course it's always possible to adjust some things
around the server, for example shorten the session timeouts, so sessions data would be garbage-collected

As I said the server is under a lot of continuous load, and this error happens when someone
does something very memory-demanding, for example I've seen it happen when using the reload
function in the manager application.

So, now I'm wondering what is the best way of detecting the error ?
I'm using windows 2000 servers...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message