Custom Code Timeouts

We provide script timeouts to protect storefronts. For example, if you accidentally create an endless loop, the loop can cause massive thread exhaustion and require a restart of the instance.

Script Timeouts

Note: The described rules apply fully for compatibility modes 21.2 and later. For older compatibility modes depending on the situation, a defined timeout may not be active.

Scripts in different contexts can have different timeouts (see the following tables). If a script is called from a different context then the resulting timeout is the one that ends earliest. For example, if shortly before the 5-minute timeout of a controller request a page designer script is started, then the page designer script can be aborted before its own 30-second timeout is finished.

Table 1. Root Contexts
Root Contexts Timeout Configurrable
Controller Requests 5 minutes -
OCAPI Requests Hooks 30 seconds -
Script module step - Yes, see Steptypes.json Syntax.
Table 2. Embedded Contexts
Embedded Contexts Timeout Configurable
Page Designer scripts 30 seconds -
Form field validation scripts 30 seconds -
Hooks called from scripts - -
ISML embedded scripts - -
Table 3. Pipeline Contexts (deprecated)
Pipeline Contexts (deprecated) Timeout Configurable
Pipeline assign node scripts 30 seconds -
Eval pipelet 30 seconds -
Script pipelet 30 seconds within storefront requests and 15 minutes within jobs Yes, see Pipelet Script.
Note: If a debug session is open, the minimum timeout for all script contexts is increased to 30 minutes.
In case a script timeout occurs the script is aborted with a non-catchable exception. The exception is logged in the error log. The message text contains something like:
ScriptingTimeoutError: Runtime of script more than 30000 milliseconds. Script stopped.
Typically this error leads to an error response (HTTP status 500) or a failed job execution. Note if this happens during template rendering the request might not fail, instead, a partly rendered response might be seen by users, but such responses are never cached longer than 5 minutes.

Pipeline Timouts

Pipeline runtime is limited via the Quota “api.pipeline.timeout”. This defines a timeout of 5 minutes for storefront requests, and no timeout during job execution, for example, via the ExecutePipeline Job Step.

Note: The rules for the script timeout always apply and aren’t influenced by the Quota “api.pipeline.timeout”.

Service Call Timeouts

The timeout values for SFTPClient, HTTPClient, and webreference objects are based on the timeout value of the calling script. The script timeout value is used as an upper bound for the timeout that is configured for the SFTPClient and HTTPClient.

It’s recommended to use the service framework, which has multiple monitoring and management features for web services. Nevertheless, for HTTPClient or SFTPClient, the timeouts can also be set as part of the function call.

To view the default global timeout:
  1. Select Administration > Global Preferences > Global Timeouts.

If you are having difficulty with scripts timing out while calling a third-party system or service, you can contact Customer Support to change the timeouts temporarily.

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.