Troubleshooting / Function Execution No Response
The function execution not responding may have multiple possibilities, which need to be identified based on different situations.
Specific manifestations:
- When accessing the interface via a browser, it stays in the loading state for a long time.
- When invoking the interface using 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 "Synchronous API (Old Version: Authorized Link)" to help identify the cause.
Test function as follows:
Python | |
---|---|
1 2 3 |
|
1. Test Function Works Normally
Possible causes and solutions:
Possible Cause | Solution |
---|---|
The invoked function indeed requires a very long runtime | Contact the function developer to troubleshoot |
2. Unable to Publish the Test Function or No Response When Invoking the Test Function
Possible causes and solutions:
Possible Cause | Solution |
---|---|
Queue block exists | Go to "About / Get System Report / Clear Work Queue" |
Redis connection issues | Check if the Redis connection configuration is correct and restart the entire DataFlux Func |
Regarding "Redis Connection 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 does not restart, it may result in all function calls having no response.
This could be because after the k8s cluster or Redis Pod restarts, the old connections between DataFlux Func and Redis are not closed, or DataFlux Func is unaware that the Redis connection has been disconnected, causing the DataFlux Func task process to always wait for messages from Redis but never communicate properly.
At this point, ensuring Redis is already running normally, restarting the entire DataFlux Func will resolve this issue.