wrapper.jvm_cleanup.timeout

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

WARNING

DO NOT modify any of these parameters unless you have read this property description. Incorrect settings can cause the Wrapper to fail to operate as expected.

Maximum number of seconds allowed for the Wrapper to clean up after the JVM has been completely shutdown and before starting the process to either start a new JVM or shutdown the Wrapper. Setting this property value to "0" (zero) means never time out.

The default value is "10 seconds".

Example:
wrapper.jvm_cleanup.timeout=10

The cleanup process consists of shutting down all managed child processes which were launched using the WrapperManager.exec() methods without setting the detached flag.

The Wrapper will attempt to shutdown any child processes still running after the JVM has exited cleanly. On UNIX platforms, this is done by sending a SIGTERM to each process and then waiting for them to exit. On Windows platforms, a WM_CLOSE message will be sent to each window owned by the child process. Many Windows applications may display save dialogs when they are asked to shutdown and thus may not completely exit on their own. It is currently not possible to send a CTRL-C to Windows console processes to ask them to shutdown cleanly, so they are currently terminated immediately.

If all child processes are determined to have been shutdown, then the Wrapper will continue before the timeout expires.

Once the timeout expires, the Wrapper will forcibly close any child processes still running. On UNIX platforms, this is done by sending a SIGKILL to each process. On Windows, the process is forcibly terminated.

Information about child processes will only be logged when DEBUG output is enabled, or when the wrapper.child.status.loglevel property is set to a level which will be visible.

Case Example:

The following example shows an example of 3 child processes being shutdown cleanly. 2 shutdown immediately, and the 3rd takes a few seconds.

wrapper  | Requesting shutdown of managed child process. PID: 1852
wrapper  | Requesting shutdown of managed child process. PID: 3584
wrapper  | Requesting shutdown of managed child process. PID: 3944
wrapper  | 3 managed child processes still running.
wrapper  | Managed child process confirmed shutdown. PID: 1852
wrapper  | Managed child process confirmed shutdown. PID: 3584
wrapper  | 1 managed child processes still running.
wrapper  | 1 managed child processes still running.
wrapper  | Managed child process confirmed shutdown. PID: 3944
wrapper  | All managed child processes shutdown.
wrapper  | <-- Wrapper Stopped

The following example shows an example of 2 child processes being shutdown cleanly, and a 3rd that times out and is killed.

wrapper  | Requesting shutdown of managed child process. PID: 3276
wrapper  | Requesting shutdown of managed child process. PID: 3328
wrapper  | Requesting shutdown of managed child process. PID: 1200
wrapper  | 3 managed child processes still running.
wrapper  | Managed child process confirmed shutdown. PID: 3276
wrapper  | Managed child process confirmed shutdown. PID: 3328
wrapper  | 1 managed child processes still running.
wrapper  | 1 managed child processes still running.
wrapper  | 1 managed child processes still running.
wrapper  | 1 managed child processes still running.
wrapper  | Forcing termination of managed child process. PID: 1200
wrapper  | Managed child process confirmed shutdown. PID: 1200
wrapper  | All managed child processes shutdown.
wrapper  | <-- Wrapper Stopped

WARNING

While the ability is there, be aware that setting this property value to "0" (zero) (= disable Timeout) or some large value will mean that the Wrapper may get stuck shutting down or may never be able to restart the JVM. It may then be necessary to manually kill the child processes to let the Wrapper resume.

Reference: Timeout