Bug 45428 - warn if the tomcat stop doesn't complete
Summary: warn if the tomcat stop doesn't complete
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.42
Hardware: PC All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2008-07-18 00:54 UTC by Ralf Hauser
Modified: 2013-08-07 18:51 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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.