Troubleshooting / Function Execution Timeout
Function execution timeout can have multiple causes and needs to be identified based on different situations.
1. Executing a Function with Long Execution Time in the DataFlux Func UI Editor
To protect the system, for functions executed in the DataFlux Func editor, the system ignores the timeout
configuration, and the execution time limit is fixed at 45 seconds.
When the function execution time exceeds the limit, the system will directly kill the process and throw an error similar to the following:
Text Only | |
---|---|
1 2 3 4 5 6 7 8 |
|
Possible Causes | Solutions |
---|---|
The executed function runs longer than the 45-second limit | Executing functions in the editor is mainly for development / debugging, and should use smaller datasets and request volumes Do not directly execute long-running tasks |
2. Function Execution Timeout Leading to Worker Process Being Killed
To protect the system, DataFlux Func has a limit on the maximum execution time of functions and does not allow them to run indefinitely. After exceeding a certain time, the execution process will be directly killed.
Specific manifestations include:
- Observing errors containing
SoftTimeLimitExceeded
in the task execution logs, such as:
Text Only | |
---|---|
1 2 3 4 |
|
- Calling a Sync API (legacy: Auth Link) returns a status code
599
, with the following data containingEFuncTimeout
(usually also containingSoftTimeLimitExceeded
information):
JSON | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Here, the reqCost
field represents the time (in milliseconds) from the start of the function execution until it was killed.
Possible causes and solutions:
Possible Causes | Solutions |
---|---|
The executed function does not specify a timeout parameter, but the function runs longer than the default timeout limit |
Contact the function developer to troubleshoot the error, including but not limited to: Timeout parameter set too short Slow response from external systems called within the function |
The executed function specifies a timeout parameter (in seconds), and the function execution exceeds this timeout |
Same as above |
The default function timeout is 30 seconds, with a maximum setting of 3600 seconds