World Map
Java Service Wrapper is the easiest way to make your product more reliable.
  • Free Trial
  • Buy Now
wrapper.disable_forced_shutdown Property

wrapper.disable_forced_shutdown

Compatibilidad :3.5.15
Ediciones :Edición ProfesionaEdición EstándarEdición de la Comunidad
Plataformas :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.

Los valores válidos de la propriedad incluyen:
  • 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.

El valor predeterminado es 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.

Referencia: Apagados

El Java Service Wrapper ofrece un conjunto completo de configuración de propriedades que le permiten hacer con que el Wrapper satisfaga sus necesidades exactas. Por favor, mire la documentación para las propriedades individuales para ver todas las posibilidades a partir de los ejemplos mostrados arriba.