Troubleshooting / Function Execution Not Responding
There may be several possible reasons why a function execution does not respond, and they need to be identified based on the specific situation.
Specifically:
- When accessing the API via browser, it stays in a loading state for a long time.
- When calling the API via curl, there is no response for a long time.
At this point, 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 Responds Normally
Possible causes and solutions:
| Possible Cause | Solution |
|---|---|
| The called function indeed takes a long time to run | Contact the function developer to troubleshoot |
2. Unable to Publish the Test Function, or Calling the Test Function Has No Response
Possible causes and solutions:
| Possible Cause | Solution |
|---|---|
| Queue blocking exists | Go to "About / Get System Report / Clear Work Queue" |
| There is a problem with the Redis connection | Check whether the Redis connection configuration is correct and restart the entire DataFlux Func |
About "Redis Connection Problems"
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 is not restarted, all function calls may become 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. As a result, the DataFlux Func task process keeps waiting for messages from Redis but can never communicate normally.
At this point, under the premise that Redis is already running normally, restarting the entire DataFlux Func can solve this problem.