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
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.
Root Contexts | Timeout | Configurrable |
---|---|---|
Controller Requests | 5 minutes | - |
OCAPI Requests Hooks | 30 seconds | - |
Script module step | - | Yes, see Steptypes.json Syntax. |
Embedded Contexts | Timeout | Configurable |
---|---|---|
Page Designer scripts | 30 seconds | - |
Form field validation scripts | 30 seconds | - |
Hooks called from scripts | - | - |
ISML embedded scripts | - | - |
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. |
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.
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.
- Select .
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.