tomcat-users mailing list archives

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

Bill,

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
  environment.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzUHqoACgkQ9CaO5/Lv0PAB4ACdG58Mi3ItAvwYOdAfdd1zUctP
4JwAmwb/HZPA9D5rJ0mUjx4v/rlleOEv
=LSsV
-----END PGP SIGNATURE-----

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


Mime
View raw message