hi Craig,

if you get OutOfMemoryError reliably in your log, you might consider the tanukisoftware Java Service Wrapper as an intermediate "solution". It can watch the output and automatically restart Tomcat. I would not combine it with an app, that has a very high volume of log output though. Also I think, the output must go throw STDOUT, so if the error occurs in different log files, you have to throw all those together to stdout. Of course with log frameworks you can define stdout as an additional log target.

Setting this service wrapper up will take you some time, but it's a very powerful wrapper.

Java 6 has

-XX:OnOutOfMemoryError="cmd1 args...;cmd2 ..."

which could also be useful (sending mail etc.). I don't really know how reliable it is, but setup is definitely faster than the service wrapper. If this works, report it back,, it might be useful for others as well. Be careful when designing cmd and args about assumptions concerning current working directory and environment.

Regards,

Rainer

Craig Berry wrote:
Our Tomcat-based app suffers from occasional OutOfMemoryErrors.  We have
found that we need to manually restart Tomcat when these happen;
frequently the Tomcat process appears to be working after the error, but
is actually crippled in one way or another by the loss of some key
thread.

We would very much like to trigger an automated Tomcat restart when an
OOME occurs.  Does anyone have suggestions on the cleanest, safest way
to arrange this?  (We're running Tomcat as a normal process under Linux,
if that matters.)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to