tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Albee" <mtita...@gmail.com>
Subject Re: Does anyone have an approach to checking if Tomcat instance is UP?
Date Tue, 21 Aug 2007 17:48:42 GMT
Everyone --

thanks for all the ideas and feedback.

We've attempted to take the approach with our health.jsp to check the major
functions in our application -- so if we can do a database request, that
checks a bunch of things - and returns without error lets us know that our
application is functioning.  We figured that since it was running through
Tomcat (as a .JSP) that tomcat would have to be up to have the page
respond... so we didn't worry about Tomcat itself.  Should we?

In this instance the health.jsp continued to work and report all was good,
while the main index.jsp got an OutOfMemory exception.

If I query the runtime memory, will that have caught the exception happening
in in the index.jsp?  So if I check the available memory or percentage and
it's lower than whtever threshhold we establish, then we could return a
'down' condition... would that be a solid way to catch any further memory
errors?

We use a monitoring tool that has the automated checks for the application
JVM and we can set different threshholds there -- but I've got to be able to
have the check run by the load balancer know that the system is down -- and
it does only a simple check against this JSP page, and then knows to fail
over -- so while we are working to establish threshhold alerts with our
monitoring application, we also want to ensure the load balancer fails over
accurately as well...

So all suggestions are welcome.

Kim :-)



On 8/21/07, Christopher Schultz <chris@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kim,
>
> Kim Albee wrote:
> > The JSP does a call to a method in our app -- which if it runs, that
> means
> > the app is up and available -- the method does a simple query against
> the DB
> > and then returns a status of OK if the method runs through just fine.
> >
> > In our example from this weekend -- the health.jsp (which is the one
> that
> > does this check) ran and returned a good result, but the main
> > index.jspreturned the 500 error with the OutOfMemory exception.  So
> > that is what is confusing here.
>
> Two things are wrong:
>
> 1. Your "health check" is flawed ; otherwise, it would catch the fact
> that you have a "dead" server.
>
> 2. index.jsp is causing its own OOME, not reporting an existing condition.
>
> What does index.jsp do that health.jsp does not?
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGyuhJ9CaO5/Lv0PARAoq1AJ45SG2Qa1qF/4BEJAoFoWG7yv4mrACdERCp
> 6CJVZUI8DlpWojvHP0+HgBM=
> =sPT9
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message