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

wrapper.jvm_kill.delay

Compatibility :3.5.6
Editions :Professional EditionStandard Edition (Not Supported)Community Edition (Not Supported)
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property controls the number of seconds to pause between firing the jvm_kill event, and actually killing the JVM.

The default value is "0" (zero) seconds.

Example:
wrapper.jvm_kill.delay=0

When the Wrapper decides to kill the JVM, some applications will first want to execute an external command to something with the JVM before it is killed. This is accomplished using the one of "event command" (wrapper.event.<event_name>.command.argv.<n>) property and the jvm_kill event. While it is possible to set the wrapper.event.<event_name>.command.block property to make sure that the command completes before continuing, some applications would still have timing issues that require additional time.

The Wrapper can be configured to request a thread dump before killing the JVM using the internal wrapper.request_thread_dump_on_failed_jvm_exit property. However, as an example, this can also be done by executing a command in response to the jvm_kill event.

Unix:

On UNIX, a thread dump can also be invoked by sending a SIGQUIT signal to the JVM process. The jvm_kill event takes place immediately before the JVM process is killed. This means that the JVM will likely have already been killed by the time the signal is actually sent. To work around this timing problem, we add a 5 second delay between the execution of the external command and the Wrapper actually killing the JVM.

Unix Example:
wrapper.jvm_kill.delay=5
wrapper.event.jvm_kill.command.loglevel=INFO
wrapper.event.jvm_kill.command.argv.1=kill
wrapper.event.jvm_kill.command.argv.2=-SIGQUIT
wrapper.event.jvm_kill.command.argv.3=%WRAPPER_EVENT_JVM_PID%

Windows:

This could also be done on Windows when running as a service. The following example assumes that the service is named "MyApp". The "255" needs to match the value of the wrapper.thread_dump_control_code property.

Windows Example:
wrapper.jvm_kill.delay=5
wrapper.event.jvm_kill.command.loglevel=INFO
wrapper.event.jvm_kill.command.argv.1=sc
wrapper.event.jvm_kill.command.argv.2=control
wrapper.event.jvm_kill.command.argv.3="MyApp"
wrapper.event.jvm_kill.command.argv.4=255

Startup-Restart: Delay