Bug 45428

Summary: warn if the tomcat stop doesn't complete
Product: Tomcat 7 Reporter: Ralf Hauser <hauser>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P3    
Version: 7.0.42   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Ralf Hauser 2008-07-18 00:54:36 UTC
my linux distro's "/etc/init.d/tomcat stop" roughly after 30 secs kill the tomcat process.

This probably relates to some web-app owned threads that wait and thus are no longer seen been by the manager.

Since this is probably a hint about an application-internal software-engineering problem.


Therefore, my suggestion:

If after ~ 15 secs (or some heuristic depending on the number of listeners configured by server.xml) the manager still couldn't really stop, print the stack-traces of the threads left to catalina.out (~ equivalent of "kill -QUIT")
Comment 1 Mark Thomas 2013-08-07 18:51:58 UTC
This has been fixed in trunk and will be included in 8.0.0-RC2 onwards.

This has been back-ported to 7.0.x and will be included in 7.0.43 onwards.

The enhancement only applies to platforms that usr catalina.sh.

A thread dump is triggered if the stop command fails to complete in a timely manner. Note that detetcing a failure to stop requires that $CATALINA_PID is set.

This will not be back-ported to 6.0.x.