Troubleshooting / Func Execution Unresponsive
Func execution unresponsive may have multiple possibilities, and it needs to be distinguished based on different situations.
Specific manifestations:
- When accessing the interface through 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.
At this time, you need to write a test function in DataFlux Func and configure it as a "Func API" to help determine the cause.
The test function is as follows:
Python | |
---|---|
1 2 3 |
|
1. Test Function Normal
Possible reasons and solutions:
Possible Reasons | Solutions |
---|---|
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 Call Test Function Unresponsive
Possible reasons and solutions:
Possible Reasons | Solutions |
---|---|
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 |
About "Redis Connection Has Issues"
In the scenario 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 has not been 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 know that the Redis connection has been disconnected, causing the DataFlux Func task process to always wait for messages from Redis but never communicate normally.
At this time, while ensuring that Redis is running normally, restarting the entire DataFlux Func can solve this problem.