This article explains how timeouts are handled in a logic and in libraries which call each other and how they are handled in general.
Summary
When a logic is executed, all timeouts are reset before each of the element’s execution.
The timeout specified on any The timeout of the library element applies to the cumulative time spent in the library element since the beginning of the current logic element’s execution and not the time spent in each call to the library element. See
You can see an example below
The timeouts of elements are always capped by the maximum timeout configured at the cluster level.
This setting defaults to 900s (15mn).
It can be increased by Pricefx Support via the setting
formulaEngine.script.maxTimeoutInSec
Before 10.2
The timeout of elements is set when the logic is pushed/saved to the partition
If : if you increased the maximum timeout in your cluster, do not forget to resave your logic if needed!
Since Bee’s Knees 10.0,
PA Data Loads, PA Distributed Calculation, DMModel Calculations and Model Calculations completely ignore the timeouts in their logics but not in their libraries
Since 10.
Be aware that this does not apply to the libraries though!2
The timeout of elements reflect the current setting of the cluster, including max timeout, even if the logic has not been resaved
The timeout of the library elements is the maximum between the current logic element’s timeout and the library element’s timeout
In particular PA Data Loads, PA Distributed Calculation, DMModel Calculations and Model Calculations completely ignore the timeouts in their logics and in the libraries they use
Example Using a Library
In this example, running libs.MyLib.ElementA.getAverageMargin()
for a large set of SKUs will time out after 2 seconds. The reason is that even though each time the getProductMargin
method is called, it takes less than 2 seconds each time, the cumulative total time spent inside that method (because of its reference in the loop) will be more than 2 seconds.
...