tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Rees" <dr...@greenhydrant.com>
Subject Re: Tomcat manager reload, start and stop functionality
Date Mon, 26 Jan 2004 22:02:35 GMT
On Mon, January 26, 2004 1at 2:54 am, Quinten Verheyen wrote:
>
> I have a question about some tasks of the manager app of Tomcat.
>
> *	The Reload-task doesn't stop and start the webapp, but I wonder how it
> exactly works. Because when I am transferring a new jar-file on the server
> and a Reload is run on the context, I need to know how this can affect the
> HTTP requests entering that context at that exact moment the reload is
> "running". I know we are talking about less than a sec. here in most
> cases, but imagine thousands and thousands of SMS messages coming in via
> HTTP requests to that context. How is this handled ? With timeout and try
> again ? Please explain this if someone would be so kind ..
>
> *	The second question involves the same matter, but with the stop and
> start task. The context is not active after running the stop (only for a
> very short time but still) so any HTTP request will fail (I guess a 404 or
> something). Is there a way to work around this ? Some kind of delay option
> or something.. to tell that any HTTP request is put into a pool and then
> run again on the context when it is active (after the start). Or are there
> better ways to assure nothing gets "lost" .. (ps of course using jsp's
> ensures not needing the start and stop, but suppose we're using servlets).

What version of Tomcat are you talking about?

TC 4.1.X handles reloads without dropping any requests, any new requests
that come in during the reload will wait until the context is finished
reloading.

TC 5.0.X replaces the reload function in TC 4 with a stop/start, so it
behaves as you've described in your second scenario above.

To work around this, you will need to cluster multiple Tomcat instances
(at least two).

When it is time to reload a context in one TC instance, you will need to
configure your load balancer to stop sending requests to that instance,
restart that instance, and then reconfigure your load balancer again to
resume sending requests to the TC instance.  You will need to repeat for
each TC instance.

This can be done using Apache/mod_jk as the load balancer.

-Dave

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


Mime
View raw message