2

I have problem with my tomcat launched as windows service. There are few web applications running on it, and when I attempt to stop service (programmatically) it takes more than 30 seconds to stop it and SCM aborts operation due to the time limitation (default is 30 seconds). This can be configured in registry, but I am not able to change it (and seems to be ugly solution). How can I solve this? Is there some kill_timeout for tomcat? Or how should I stop my applications?

1 Answers1

0

The Tomcat config GUI (AKA The Apache "Commons Daemon Service Manager") has a Shutdown tab (Tip: open tomcatw.exe in your installation path). Here you will see a Timeout value. This might solve your problem.

Screenshot of tomcatw.exe | Shutdown | Timeout

It is also explained in https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Command_line_parameters:

ParameterName Default Description
[...]
--StopTimeout No Timeout Defines the timeout in seconds that procrun waits for service to exit gracefully.

Alternatively, check this: Tomcat doesn't stop. How can I debug this?

StackzOfZtuff
  • 2,534
  • 1
  • 28
  • 25
ozkansari
  • 121
  • 7