tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynir Hübner <rey...@hugsmidjan.is>
Subject RE: [partially off topic] How can I detect java.lang.OutOfMemoryError
Date Wed, 16 Apr 2003 08:49:16 GMT
Yes, that's what I was thinking of doing...

Monitor the catalina-out log files, but does anyone have any good tools to do it on windows
?
I think I would use tail, and grep on unix, and then pipe something into emails if I got that
error somewhere, but that is not available in windows (unless I install cygwin etc) there
must be a native way of doing things like that in windows...

Any good ideas ?

Thanx ralph, 
-reynir


> -----Original Message-----
> From: Ralph Einfeldt [mailto:ralph.einfeldt@uptime-isc.de] 
> Sent: 16. apríl 2003 06:49
> To: Tomcat Users List
> Subject: RE: [partially off topic] How can I detect 
> java.lang.OutOfMemoryError
> 
> 
> As you have a quite undefined state after a OutOfMemoryError 
> occured you can't rely on anything that tries to do anything 
> inside the current vm.
> 
> I see following options:
> 
> - Monitor the application or the the log from the outside
>   for OutOfMemoryErrors.
> 
> - Monitor the application from the inside, but don't watch 
>   for OutOfMemoryErrors but for the total/free memory
>   and do what you want whenever these value reach critical
>   values.
> 
> - Do a mixture of both (My recommendation):
>   Write a jsp that prints out the total and free memory
>   Write a external job that requests this page frequently,
>   and performs the check on the result. (This way you can
>   decrease the treshhold for the  critical values, as you
>   don't have to rely on the current vm to send the mail)
> 
> > -----Original Message-----
> > From: Reynir Hübner [mailto:reynir@hugsmidjan.is]
> > Sent: Tuesday, April 15, 2003 5:49 PM
> > To: Tomcat Users List
> > Subject: [partially off topic] How can I detect 
> > java.lang.OutOfMemoryError
> > 
> > 
> > Hi,
> > 
> > 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 faster.
> > 
> > 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...
> > 
> > Thanx
> > -reynir
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

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


Mime
View raw message