Hi Mark,

Thanks for your reply. I guess this means that if Tomcat hangs during
shutdown then something is wrong with the application and it can't close the
threads? What can I do to trouble shoot this and find exactly where the
problem is? (except taking stack trace on the hanged process of course)

Igor

On Mon, Mar 21, 2011 at 8:07 PM, Mark Thomas <ma...@apache.org> wrote:

> On 21/03/2011 02:15, Igor Cicimov wrote:
> > Hi,
> >
> > I'm running Tomcat 6.0.26 on Solaris 10 and have a question about what
> > exactly happens during Tomcat graceful shutdown? I guess first thing it
> does
> > is stop accepting new sessions on the listening ports.
>
> Sessions aren't received on ports, requests are.
>
> > just for the servelets to finish their current requests?
>
> New requests are not processed. Existing requests are allowed to continue.
>
> > What happens exactly with the servlets and the threads? In general, how
> the
> > threads and servlets are being destroyed during graceful shutdown?
>
> Servlets are given a short time to complete and if they don't the JVM
> shuts down anyway. Since they run on daemon threads those threads will
> be forcibly stopped by the JVM during shutdown.
>
> Application generated threads should be stopped by the application.
>
> > When I issue the following command from the unix shell:
> >
> > # $TOMCAT_HOME/bin/catalina.sh stop 600
> >
> > I can still see the server being shut down in less than 10 seconds
> although
> > I specify 10 minutes delay. Does that mean that the server has already
> shut
> > down all the resources properly and doesn't have to wait for 10 minutes?
>
> Yes.
>
> > Is the unloadDelay specified in the application Context the only wait of
> > controlling the shutdown process (the servlet unload time)?
>
> Yes.
>
> > How can I make sure that all the requests finish before the server
> shutdown?
>
> Make sure they always complete in less than unloadDelay.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to