You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jindong Li <Ji...@solcorp.com> on 2003/02/10 21:22:29 UTC

RE: Shutdown.sh does not work when long lasting operations, such as SQL Queries, are still active!

In our case I think all threads started by our web application are cleaned
up properly...the delay we're experiencing seems to be within 40 second
which is acceptable otherwise...but the thing is that our users are used to
the way TC401 shuts down (within 1 sec), they simply can not accept that 40
sec extra delay ... :-(

 -----Original Message-----
From: 	Craig R. McClanahan [mailto:craigmcc@apache.org] 
Sent:	Monday, February 10, 2003 2:07 PM
To:	Tomcat Developers List
Subject:	RE: Shutdown.sh does not work when long lasting operations,
such  as SQL Queries, are still active!



On Mon, 10 Feb 2003, Jindong Li wrote:

> Date: Mon, 10 Feb 2003 13:53:52 -0500
> From: Jindong Li <Ji...@solcorp.com>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: 'Tomcat Developers List' <to...@jakarta.apache.org>
> Subject: RE: Shutdown.sh does not work when long lasting operations,
>      such  as SQL Queries, are still active!
>
> I think that's what we're experiencing here with Tomcat4.0.5...we have
been
> using TC401 and the shutdown is instant...but I think they have changed
the
> way TC is shutting down now...TC will gracefully shutdown i.e. waiting for
> all threads finish and then exit...
>
> If you want...you can try TC401, see if you still experience the delay...
>
> I posted a similar message before and haven't got any response from the
> community yet...:-(
>

It is OK for web applications to start threads -- as long as the web
application cleans up after itself when the application is shut down (the
easiest way to detect that is to create a ServletContextListener and wait
for the contextDestroyed() method of your listener to be called).

The JVM running Tomcat shuts down when all non-daemon threads have been
killed.  Tomcat properly cleans up all the threads that *it* creates -- it
is up to your application to do the same.

> Jindong.
>

Craig

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


############################################################################
#########
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
############################################################################
#########

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#####################################################################################

RE: Shutdown.sh does not work when long lasting operations, such as SQL Queries, are still active!

Posted by Kief Morris <ki...@kief.com>.
Jindong Li typed the following on 15:22 10/02/2003 -0500
>In our case I think all threads started by our web application are cleaned
>up properly...the delay we're experiencing seems to be within 40 second
>which is acceptable otherwise...but the thing is that our users are used to
>the way TC401 shuts down (within 1 sec), they simply can not accept that 40
>sec extra delay ... :-(

Maybe it's saving sessions to disk?

Kief


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