-----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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to