Troubleshooting / Function Execution Timeout
Function execution timeouts may have multiple possible causes and need to be diagnosed according to the specific situation.
1. Executing functions that take too long in the DataFlux Func UI editor
To protect the system, when executing functions in the DataFlux Func editor, the system ignores the timeout configuration, and the time limit is fixed at 60 seconds.
When a function runs longer than the time limit, the system directly kills the process and throws an error similar to the following:
| Text Only | |
|---|---|
1 2 3 4 | |
| Possible Cause | Solution |
|---|---|
| The executed function runs longer than the 60-second limit | Executing functions in the editor is mainly for development / debugging, so smaller datasets and request volumes should be used Do not directly execute complete long-running tasks |
2. Function execution takes too long and causes the worker process to be killed
To protect the system, DataFlux Func imposes a limit on the maximum execution time of functions and does not allow functions to run indefinitely. After exceeding a certain time, the execution process is killed directly.
Specifically:
- In the task execution logs, errors containing
TaskTimeoutare observed, such as:
| Text Only | |
|---|---|
1 2 3 4 | |
- When the Func API is called, status code
599is returned, along with the following data containingEFuncTimeout(usually also containingTaskTimeoutinformation):
| JSON | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
Here, the reqCost field is the time elapsed (in milliseconds) from when the function started executing until it was killed.
Possible causes and solutions:
| Possible Cause | Solution |
|---|---|
The executed function does not specify the timeout parameter, but runs longer than the default timeout limit |
Contact the function developer to troubleshoot the error, including but not limited to: The timeout parameter is set too short External systems called within the function respond too slowly |
The executed function specifies the timeout parameter (in seconds), and the function exceeds the timeout |
Same as above |
Function timeout defaults to 30 seconds, and the maximum setting is 3600 seconds