TIMEOUT - set timeout

SYNOPSIS

<TIMEOUT = n[ /]>
  ... text/HTML to print on timeout ...
[</TIMEOUT>]


DESCRIPTION
The TIMEOUT directive sets a timeout (in seconds) for the execution of the Vortex script. If script execution takes longer than n seconds, the enclosed text or HTML is printed and the script exits. Command-line option -t overrides this directive, and <vxcp timeout> overrides -t. The text to print can be overridden at runtime (in version 7 and later) with <vxcp timeouttext>. The default timeout is 30 seconds.

As it is a directive, TIMEOUT must appear before the first function in the script.


EXAMPLE

<TIMEOUT = 10>
  <H4>Time Exceeded</H4>
  Your query exceeded the time limit.
</TIMEOUT>


CAVEATS
The TIMEOUT directive was added Sep. 4 1996.

The n argument must be an integer literal, since TIMEOUT is evaluated at compile time. No Vortex commands may appear inside the TIMEOUT element.

If a timeout of -1 is given, the timeout is disabled (no time limit). This is not recommended in a web environment: multiple invocations of a time-consuming script could potentially pile up and load the server.

The execution time of a script may also be affected by a time limit the web server imposes on CGI programs: the server might kill the script before the TIMEOUT directive does. Consult your web server manual.

The script timeout can be overridden at run time with <vxcp timeout> (here).

Do not confuse the script timeout (<TIMEOUT> directive) with the network timeout (<urlcp timeout>) or JavaScript timeout (<urlcp scripttimeout>). The network timeout should be smaller than the script timeout (<TIMEOUT>) when fetching pages, or the script may end before the fetch error is returned.


SEE ALSO
vxcp


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.