windowstomcatwindows-servicestomcat9

Tomcat 9 takes 1 minute to stop


I installed tomcat 9.0.14 on my system(Windows 10, Windows server 2016 R2) I've no issue while starting the tomcat service(start in 2-3 sec). However, it takes 1 minute to stop. I thought one of my project residing under webapps is taking time so I removed all my project but result is same. After that I make it empty webapps folder empty to check further still tomcat took 1 min to stop. I check the log file and their are no errors.Tomcat is idle for 1 minute while stopping.

Common-deamon.log-------

[2019-01-08 16:30:02] [info]  [13948] Stopping service... 
[2019-01-08 16:30:03] [info]  [13948] Service stop thread completed.
[2019-01-08 16:31:03] [info]  [ 1940] Run service finished.
[2019-01-08 16:31:03] [info]  [ 1940] Commons Daemon procrun finished 

catalina.log--------

08-Jan-2019 16:30:02.399 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
08-Jan-2019 16:30:02.431 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
08-Jan-2019 16:30:02.453 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
08-Jan-2019 16:30:02.453 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
08-Jan-2019 16:30:02.453 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]

Is their any way I can reduce the sopping time of tomcat 9. In tomcat 8 stopping time was 3-5 sec Any help is appreciated.....


Solution

  • I was abel to reproduce this by

    This seemes to be an issue of Tomcat, but current developer snapchot (trunk) changelog suggests it has been already fixed for not yet released Tomcat 9.0.15+ without explicit bug report assigned:

    Tomcat 9.0.15 (markt) in development / Catalina:

    Correct a bug exposed in 9.0.14 and ensure that the Tomcat terminates in a timely manner when running as a service. (markt)