KEEP_ALIVE

The KEEP_ALIVE element specifies how long (in seconds) the proxy waits before shutting down when no longer serving requests.

Syntax

 <KEEP_ALIVE>seconds</KEEP_ALIVE>
  1. seconds specifies how long the proxy waits before shutting down when no longer serving requests. A default value is set by the resource $(ws.timeout.keepalive) to 3600 seconds or one hour.

Child elements

There are no child elements.

Usage

You use this element to specify a time out for the proxy before it shuts down due to inactivity. If the KEEP_ALIVE element is not specified, the proxy will never shutdown. If it is specified, it prevents the DVMs from running indefinitely in the unlikely event that the dispatcher or the web server crashes.

Usage example with resource

<KEEP_ALIVE>$(ws.timeout.keepalive)</KEEP_ALIVE>
You can set KEEP_ALIVE with the resource:
<RESOURCE Id="ws.timeout.keepalive" Source="INTERNAL">1800</RESOURCE>
In this example, the timeout duration is set to 1800 seconds or 30 minutes. This means that the GWS proxy will wait for 1800 seconds before it frees up the DVMs and the proxy is stopped.
Using the resource has advantages over setting the timeout directly for the following reasons:
  • Shared resource: The resource is shared by other configuration components, ensuring that any changes automatically apply everywhere it is used.
  • Command line override: You can override the default value from the command line when starting the dispatcher by using the resource. For example: httpdispatch -E ws.timeout.keepalive=1800.

Usage example - use KEEP_ALIVE directly

To set KEEP_ALIVE in your web service configuration file (xcf), add a TIMEOUT element.
<APPLICATION Parent="ws.default">
   #...
   <TIMEOUT>
     <KEEP_ALIVE>1800</KEEP_ALIVE>
   </TIMEOUT>
    #...
 </APPLICATION>

In this example, the timeout duration is set to 1800 seconds or 30 minutes. This means that the GWS proxy will wait for 1800 seconds before it frees up the DVMs and the proxy is stopped.

Parent elements

This element is a child of the following: