Troubleshooting / Unresponsive Function Execution
Unresponsive function execution can have various causes and needs to be identified based on different situations.
Specific manifestations are:
- When accessing the interface via a browser, it remains in a loading state for a long time.
- When calling the interface via curl, there is no response for a long time.
In this case, you need to write a test function in DataFlux Func and configure it as a "Function API" to help determine the cause.
The test function is as follows:
| Python | |
|---|---|
1 2 3 | |
1. Test Function Works Normally
Possible causes and solutions:
| Possible Cause | Solution |
|---|---|
| The called function indeed requires a long time to run | Contact the function developer to troubleshoot the issue |
2. Unable to Publish Test Function, or Calling Test Function Gets No Response
Possible causes and solutions:
| Possible Cause | Solution |
|---|---|
| Queue blockage exists | Go to "About / Get System Report / Clear Work Queue" |
| Redis connection has issues | Check if the Redis connection configuration is correct and restart the entire DataFlux Func |
Regarding "Redis Connection Has Issues"
In scenarios where DataFlux Func is deployed in k8s, if the k8s cluster crashes and restarts or the Redis Pod crashes and restarts, but DataFlux Func itself is not restarted, it may cause all function calls to be unresponsive.
This may be because after the k8s cluster or Redis Pod restarts, the old connection between DataFlux Func and Redis is not closed, or DataFlux Func cannot detect that the Redis connection has been disconnected. This leads to the DataFlux Func task processes waiting for messages from Redis but never being able to communicate normally.
In this case, ensuring Redis is already running normally, restarting the entire DataFlux Func can resolve this issue.