Search code examples
javatomcattomcat8tomcat9

Increase Tomcat shutdown timeout


I need to increase Tomcat shutdown timeout to 45 seconds in Windows. When I stop Tomcat in the services. It takes almost 35-40 seconds. How could I increase shutdown timeout in Tomcat configuration?


Solution

  • According for the Tomcat documentation for the Windows services integration, there is a --StopTimeout option that you can provide when configuring the service that gives a timeout for graceful service shutdowns.

    If you have already installed the service, you can edit the StopTimeout value via the "Shutdown" tab of the Tomcat Monitor.

    Note that this parameter is a standard procrun setting.