You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Danforth <sd...@epathlearning.com> on 2007/02/13 21:54:30 UTC

2nd Try for Advice on Tomcat Shutdown

Hmmm. I just joined this mailing list today, and I'm happy to see that 
there's lots of action.

But, so far, nobody has responded to my posting. Maybe I'm asking about 
something so trivial that
everybody thinks somebody else will respond...

Anyway, having said that, I'll try again. Hopefully, somebody will 
respond with a comment.

I want to convert an application that currently uses JServ (with load 
balancing) to Tomcat. In reading about Tomcat
everything looks good, but there's one aspect of our current approach 
that I don't see any support for: putting a worker
into "shutdown" mode without completely stopping it, and then waiting 
for all of its current sessions to be concluded.

Load balancing on JServ was based on a memory-mapped file that
stored the current state of  different JServ instances, and you could 
write to this file to change that state. One of the
useful states was called "shutdown." In this state, mod_jserv would 
continue to route page requests for existing  sessions
to their corresponding Jserv instance, but no new requests would be 
routed there.

So you could put a Jserv worker into shutdown mode, and then wait for it 
to become quiescent, after which you could
kill the worker and perform maintenance on that system. This was 
sometimes called a "soft shutdown."  We run a 24/7
application and use this approach to rotate through servers while 
releasing new code.

I found archived mail (from 2002) with a query along these lines that 
suggested a way of accomplishing this for Tomcat, but don't
know what the ultimate outcome of that suggestion was (if anything).

http://mail-archives.apache.org/mod_mbox/tomcat-dev/200205.mbox/%3CDD392039E892594289474E1F7234FF1905766E3A@hermes.sds.no%3E

I kind of expect there must be something in Tomcat like JServ's soft 
shutdown for people that want to run 24/7 while bringing
workers up and down. Can somebody tell me what the Tomcat solution is?

    Thanks in advance for any comments
    -- Scott.








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


Re: 2nd Try for Advice on Tomcat Shutdown

Posted by Hassan Schroeder <ha...@gmail.com>.
On 2/13/07, Scott Danforth <sd...@epathlearning.com> wrote:

> The only problem is that my session data isn't serializable. So it isn't
> going anywhere in the near term.

That is, indeed, a fly in the ointment ... :-)

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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


Re: 2nd Try for Advice on Tomcat Shutdown

Posted by Scott Danforth <sd...@epathlearning.com>.
Thanks, Hassan,

I've seen session replication mentioned and suspected that might be the 
answer now. 

Just stopping a worker and letting its sessions go elsewhere is certainly
more elegant than waiting around for sessions to be concluded.

The only problem is that my session data isn't serializable. So it isn't 
going
anywhere in the near term.

But, again thanks. I appreciate your help. :-)

    -- Scott.


Hassan Schroeder wrote:

> On 2/13/07, Scott Danforth <sd...@epathlearning.com> wrote:
>
>> Hmmm. I just joined this mailing list today,
>
>
>> But, so far, nobody has responded to my posting. Maybe I'm asking about
>> something so trivial
>
>
> or maybe you're just a wee bit impatient? :-)
>
>> I kind of expect there must be something in Tomcat like JServ's soft
>> shutdown
>
>
> Not that it' s definitive, but I've never heard of such a thing.
>
>> Can somebody tell me what the Tomcat solution is?
>
>
> Yeah, don't worry, be happy; use session replication and just pull the
> plug whenever. At least that's worked for me  :-)
>
> FWIW,


-- 

Scott Danforth, Ph.D.
Director of Technology
ePath Learning, Inc.
70 Howard Street, Suite C
New London, CT 06320
Phone: (860) 444-6989 ext. 3
Fax: (215) 243-7454
email: sdanforth@ePathLearning.com




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


Re: 2nd Try for Advice on Tomcat Shutdown

Posted by Hassan Schroeder <ha...@gmail.com>.
On 2/13/07, Scott Danforth <sd...@epathlearning.com> wrote:
> Hmmm. I just joined this mailing list today,

> But, so far, nobody has responded to my posting. Maybe I'm asking about
> something so trivial

or maybe you're just a wee bit impatient? :-)

> I kind of expect there must be something in Tomcat like JServ's soft
> shutdown

Not that it' s definitive, but I've never heard of such a thing.

> Can somebody tell me what the Tomcat solution is?

Yeah, don't worry, be happy; use session replication and just pull the
plug whenever. At least that's worked for me  :-)

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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