wrapper.disable_forced_shutdown

Compatibility :3.5.15
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

When the user presses CTRL-C in a Windows console or UNIX shell, or sends a TERM signal to the Wrapper process on UNIX, the Wrapper will begin its shutdown process. This means that the Wrapper will honor all of its configured timeouts, waiting for the JVM to shutdown and exit cleanly before shutting down itself.

If the JVM is behaving poorly, or there was a misconfiguration, this means that the Wrapper could potentially take quite a while to actually shutdown. Early in the life of the Wrapper, this usability problem was identified and we added logic so that a second CTRL-C or TERM signal would tell the Wrapper to ignore all the timeouts, kill the JVM process immediately, and shutdown now. This forced shutdown will also happen if the Wrapper had already begun its shutdown process for any other reason.

While this behavior is usually very convenient, there are also times where the administrator wants to make sure that the JVM will never be forcibly shutdown in this way. This property makes it possible to disable this feature.

Since version 3.5.37 it is also possible to use the wrapper.forced_shutdown.delay property which controls the minimum amount of time required between two CTRL-C or TERM signals to initiate a forced shutdown.

Valid property values include:
  • TRUE :
    to disable the forced shutdown. Any secondary requests to shutdown will be ignored.
  • FALSE :
    to enable the forced shutdown. A shutdown request received when the Wrapper is already shutting down will cause the JVM to be immediately killed.

The default value is FALSE.

Configuration Example:
wrapper.disable_forced_shutdown=TRUE
Log Example: (Forced shutdown enabled)
wrapper  | CTRL-C trapped.  Shutting down.
wrapper  | CTRL-C trapped.  Forcing immediate shutdown.
wrapper  | JVM did not exit on request, terminated
wrapper  | <-- Wrapper Stopped
Log Example: (Forced shutdown disabled)
wrapper  | CTRL-C trapped.  Shutting down.
wrapper  | CTRL-C trapped.  Already shutting down.
wrapper  | ...
wrapper  | <-- Wrapper Stopped

If forced shutdowns have been disabled and the wrapper.shutdown.timeout or wrapper.jvm_exit.timeout properties are set to long values, you may need to wait for both timeouts to complete before the Wrapper will shutdown. In this case, the only way to speed up the shutdown is to forcibly kill the Java process using the Task Manager on Windows, or a kill -9 on UNIX. Note that on some versions of Windows, it is not possible to kill Java from the Task Manager when running as a service.

Reference: Shutdown

The Java Service Wrapper provides a full set of configuration properties that allows you to make the Wrapper meet your exact needs. Please take a look at the documentation for the individual properties to see all of the possibilities beyond the examples shown above.