On 14/03/2019 20:23, Louis Zipes wrote:
> Hi Experts,
> Running Tomcat 7.0.54 on Windows 2012
> 
> Our morning process is to fire a stop of the Tomcat Windows Service and then 
> an immediate restart.  This is more due to the 3rd party application that is 
> running with Tomcat than a problem with Tomcat.  A few weeks ago it started 
> to not cleanly stop when using the following batch file command.  Note that 
> this had worked for more than a year with no problems and I don't think that 
> there have been any server changes although I don't control the machine
> 
> 
> net stop "Apache Tomcat 7.0 TPMDEV" && net start "Apache Tomcat 7.0 TPMDEV"
> 
> I then changed the batch file, that calls the Windows Service stop/start to 
> give a 65 second delay between the stop and start hoping to give it more time 
> to cleanly stop before restarting:
> 
> 
> ====
> 
> net stop "Apache Tomcat 7.0 TPMDEV"
> 
> PING localhost -n 65 >NUL
> 
> net start "Apache Tomcat 7.0 TPMDEV"
> 
> 
> ====
> 
> This modified batch file worked for about 2 weeks but then this morning it 
> failed to stop and restart correctly.  Since it is PRD we just have to get it 
> restarted so I usually don't have time to troubleshoot getting threads, etc.  
> (also, the off shore team is on shift when this happens but I'm the 
> administrator that actually has to get to root cause when I start my shift).
> 
> I observed the following in the std-output log it seems to receive the 
> Shutdown command but it seems like either all of the threads are not being 
> closed for some reason
> 
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardServer await
> INFO: A valid shutdown command was received via the shutdown port. Stopping 
> the Server instance.
> Mar 14, 2019 5:28:00 AM org.apache.coyote.AbstractProtocol pause
> INFO: Pausing ProtocolHandler ["http-bio-7005"]
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardService stopInternal
> INFO: Stopping service Catalina
> Mar 14, 2019 5:28:00 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
> Mar 14, 2019 5:28:01 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
> Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
> --
> 
> 
> So my questions are:
> 
> 1) Does anyone have a better way to make sure Tomcat is fully stopped and any 
> open threads are killed

Killing the process is probably the only other option.

> 2) Is this part below real cause and I need to find the root cause by doing a 
> thread dump?  As mentioned it is hard for me to get one because I'm usually 
> not on shift when this happens.

Yes. You need a thread dump to find out what is going on here. I'd guess
the application has been updated just before this problem started happening.

Mark


> 
> Mar 14, 2019 5:28:03 AM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 94 instance(s) to be deallocated for Servlet 
> [RequestDispatcherServlet]
> 
> Thanks, Louis
> 
> ---------------------------------------
> CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and 
> may contain information that is confidential, proprietary or exempt from 
> disclosure. If you are not the intended recipient, please contact the sender 
> immediately. Unauthorized use or distribution is prohibited and may be 
> unlawful.
> 


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

Reply via email to