tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Any tools to detect tomcat services failure, and start it again automatically?
Date Fri, 05 Nov 2010 15:11:38 GMT
Hash: SHA1


On 11/5/2010 7:51 AM, Bill Wang wrote:
> I am searching the tool (or script) to be used for my tomcat env, that it
> can keep running as daemon in background, detect the tomcat services
> (several versions of tomcat). If it found the services don't run, or have
> failure, it will start it again automatically.

I don't run it myself so I'm not entirely sure of the details, but I
believe that jsvc has the capability of detecting a JVM crash and
restarting everything. There are situations where Tomcat might be
considered "down" and yet the JVM is completely healthy: these scenarios
are not detectable by jsvc, so you'll need an additional check as well.

Modern JVMs have switches that allow you to run external commands under
certain conditions (OOME... are there others?) -- you could use that as
part of your strategy.

> I think I can put the script in cronjob, and run every 5 minutes, or by
> other way, please recommend.

We do this in production in two ways:

- - health check ping against a dynamic resource; if it succeeds, the
  server is up. we also report certain information that may predict
  a future problem (memory conditions, db pool stats, etc.)
- - watching catalina.out; if we see something awful, we start ringing
  phones. we could auto-restart, but that's not desirable in our

Hope that helps,
- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message