How Timeouts Work

This article explains how timeouts are handled in a logic and in libraries which call each other:

  • There is no concept of timeout of a logic itself, only for each of its elements.

  • Each execution of a logic element is expected to be finished within the given time (by default 5 seconds).

  • If the timeout is reached, the script execution is interrupted and any change done during the whole logic execution is not saved.

  • Any library calls in the element are counted as part of execution time of the element.

    • In other words, library element timeouts are ignored, what matters is the time the whole element execution takes.

  • To increase the timeout, set the value Timeout Override on the element to a reasonable higher value, max 900 seconds.

  • The Timeout Override can be set to 900 seconds for library logics, but for all other logics it should be set to reasonable value (lower than 900 seconds).

Special Considerations

  • PA Data Loads, PA Distributed Calculation, DMModel Calculations and Model Calculations completely ignore the timeouts in their logics.

  • In tasks where multiple line items are calculated (e.g., PG, PL), the logic is executed for each line item independently of each others, so one line item execution time is not taken into account for the timeout of another item.

Timeout Settings

If an element doesn't have a timeout set, the default timeout is set to 5 seconds. If an element has a custom timeout set (e.g., 60 or 120 seconds), it will timeout after the custom timeout, unless it exceeds the max timeout, in which case it is capped by maxTimeoutInSec (see below).

Default Timeout

  • formulaEngine.script.timeoutInSec – The default timeout (in seconds) for each logic element execution, unless explicitly set on the element.

  • Default: 5 seconds

Maximum Timeout

  • formulaEngine.script.maxTimeoutInSec – The maximum timeout allowed per element execution. No logic can run longer than this, even if a higher timeout is defined at the element level.

  • Default: 900 seconds (= 15 minutes)

  • For example:

    • Logic with timeout set to 60 seconds: runs for 60s.

    • Logic with timeout set to 1200 seconds: will still timeout after 900s, which is the cluster-level cap.

Cluster Configuration Notes

  • In some cloud environments (clusters), the default timeout (formulaEngine.script.timeoutInSec) may be overridden by cluster config template to 10 seconds.

  • In exceptional cases Pricefx Support may increase the maximum timeout (formulaEngine.script.maxTimeoutInSec).