Index

wrapper.ping.timeout

Compatibility :1.0.0
Editions :Professional EditionStandard EditionCommunity Edition
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.

Number of seconds to allow between two ping responses coming from the JVM.

The default value is "30 seconds".

Example:
wrapper.ping.timeout=30

Setting this property value to "0" (zero) means never time out. The ping timeout must be at least 5 seconds longer than the value of wrapper.ping.interval. The Wrapper will modify the value at run time if necessary to avoid problems.

In normal operation, the Wrapper pings the JVM once every 5 seconds to make sure that its process has not frozen up. The ping timeout is the amount of time to allow for 2 responses from the JVM before the Wrapper assumes that it is hung and restarts it.

This property also controls the amount of time that the JVM will allow to pass without being pinged by the Wrapper. If the Wrapper does not ping the JVM for longer than the specified timeout, it will exit, allowing the Wrapper to resync by launching a new JVM. This also makes sure that the JVM will exit if the Wrapper process is terminated abnormally. (By killing the Wrapper process in the Windows Task Manager, or using "kill -9" signal on UNIX systems.)

Starting with Wrapper version 3.5.21, the Professional edition of the Wrapper will also fire a jvm_ping_timeout event whenever this threshold has been exceeded.

With the addition of the wrapper.cpu.timeout property, there is now almost no reason why you should ever need to change this property. The only reasons why you should be getting ping timeouts are if the system is under heavy load or if the JVM is really hung. The CPU timeout should now detect any problems in with CPU.

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's ability to detect a JVM hang while it is running will be disabled.

Also note that if the Wrapper process is killed abnormally or God forbid crashes, then the JVM will never attempt to resync with the Wrapper. If the Wrapper was running as a Windows Service at the time, it may be necessary to then reboot the machine to stop the Java process. With normal ping timeouts, the JVM would exit on its own after a few seconds.

While the wrapper.java.detect_debug_jvm property is set to "TRUE" and the Debugger Detection is functioning, this "timeout" property will be ignored.

wrapper.ping.timeout.action

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

This property allows to specify a certain action to be performed whenever a ping timeout takes place after the seconds specified in the wrapper.ping.timeout property above.

For consistency and backwards compatibility, the default action is specified as RESTART.

Example:
wrapper.ping.timeout.action=RESTART

Possible actions are:

  • DEBUG (Since ver. 3.5.0) :

    will cause a debug message to be logged. This is only really useful in helping to understand when the action is fired.

  • STATS (Since ver. 3.5.52, Standard /Professional Edition):

    will print performance statistics.

  • DUMP (Since ver. 3.3.6) :

    will invoke a thread dump.

  • GC (Since ver. 3.5.7) :

    will invoke a full garbage collection sweep in the JVM. Be aware that doing this frequently can affect performance of the JVM, as a full sweep will often cause all threads to freeze for the duration of the GC.

  • RESTART :

    will stop the current JVM and then restart a new invocation.

  • SHUTDOWN :

    will stop the JVM as well as the Wrapper.

  • USER_<n> (Since ver. 3.5.0, Professional Edition) :

    will cause a user defined event to be fired. This can be either the sending of an email, or the execution of an external system command. The command could be anything from performing clean up operations to raising an SNMP trap.

  • PAUSE (Since ver. 3.5.0) :

    will pause the Java application if pausing is enabled and the JVM is running. See the wrapper.pausable property for details.

  • RESUME (Since ver. 3.5.0) :

    will resume the Java application if it is in a paused state. This could be used if the JVM is not stopped when paused. See the wrapper.pausable property for details.

  • SUSPEND_TIMEOUTS_<n> (Since ver. 3.5.40, Standard /Professional Edition) :

    Tells the Wrapper to suspend all timeouts used when the JVM is not responding. <n> specifies the number of seconds to suspend timeouts, and should be in the range 1-3600 (1h). This could be used if the Java application needs to perform a long blocking task and avoid having the Wrapper considering the application as unresponsive.

    Timeouts can also be suspended via other action properties, the command file or the Java WrapperManager.suspendTimeouts() method.

    If several requests to suspend timeouts are made, the number of seconds specified by each request will not be summed. Instead, the newly specified time will replace the remaining suspension time if it is longer, and will be ignored otherwise.

  • RESUME_TIMEOUTS (Since ver. 3.5.40, Standard /Professional Edition) :

    Tells the Wrapper to resume all timeouts previously suspended.

    Timeouts can also be resumed via other action properties, the command file or the Java WrapperManager.resumeTimeouts() method.

  • SUCCESS (Since ver. 3.5.5) :

    will tell the Wrapper to reset its internal failed invocation count and count the current JVM invocation as "successful". This can be useful in applications designed to restart with a fairly short frequency.

  • NONE :

    is useful because it will prevent any triggers with a higher number from being triggered.

NOTE

Please note that if the JVM is completely frozen, some of the actions might, however, not be able to be processed by the JVM, e.g. GC, DUMP

Chaining Multiple Actions:

It is possible to specify more than one action by separating them with a space or comma. When more than one action is specified, they will be executed in rapid succession in the order specified.

The following example will attempt to perform a thread dump and then restart the JVM. The thread dump will only take place if the JVM is not fully frozen.

Example:
wrapper.ping.timeout.action=DUMP,RESTART

Reference: ping

Reference: Timeout