Hi,

from what I have read I expected tomcat to shutdown gracefully (which to me
means "do not accept any other request and end the current ones before
shutdown") but my test doesen't confirm it.

I have a servlet with the following code:

====================================
for (int i = 0; i < 50; i++) {
    System.out.println("waiting " + i);
    Thread.currentThread().sleep(500);
}
PrintWriter writer = aResponse.getWriter();
writer.write("duh");
writer.flush();
====================================

and this is the output when I issue a request and then run ./shutdown.sh

====================================
waiting 0
waiting 1
waiting 2
waiting 3
waiting 4
waiting 5
waiting 6
Oct 5, 2009 2:00:43 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8084
waiting 7
waiting 8
Oct 5, 2009 2:00:44 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 5, 2009 2:00:45 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
waiting 9
waiting 10
waiting 11
Oct 5, 2009 2:00:46 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
waiting 12
waiting 13
Oct 5, 2009 2:00:47 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
Oct 5, 2009 2:00:47 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8084
====================================

As you can see it only waited for 3 seconds before taking down the server
instead to let the request end.... is there a way to configure how long to
wait? 

Thanks

Marco

-- 
View this message in context: 
http://www.nabble.com/shutdown.sh-and-graceful-shutdown-tp25749596p25749596.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to