-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using knowledge API from within Dify as a custom tool fails or gives 524 error from cloudflare #12276
Comments
The issue you're experiencing with the Knowledge API in Dify, resulting in a Cloudflare 524 error, could be related to timeout settings. The default timeout for API requests in Dify is controlled by the Additionally, the Since the issue occurs when using the API from within Dify but not when using external tools like Postman, it suggests that the internal timeout settings or retry mechanisms might be causing the problem. Adjusting these timeout settings could help resolve the issue. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Additional explanation about the rationale, since you might be asking "why do we need to call knowledge API using a custom tool instead of using the built-in knowledge tools provided by the Dify UI"? Answer: We need to be able to dynamically search from multiple different dataset IDs during runtime, so when we build the chatflow or workflow, we actually don't know which datasets to connect to. During runtime, we will pass the dataset ID as input variable which will be fed into the tool as |
I can report that the service returned to normal yesterday after several hours of being offline (from Dify SaaS servers perspective, at least). Will let you know if there are further disruptions. |
We have some network issues last week from time to time. We have added more pods to handle more requests. |
Thanks for clarifying the issue! And as you can see, we already figured out a way to workaround a dynamic dataset solution with the custom tool trick. But cool if you start offering the support officially soon also. Edit: Now I feel silly as I JUST discovered HTTP request node which makes it even simpler compared to tool use. No need to compose an OpenAPI definition. Just enter all the parameters manually haha |
Self Checks
Dify version
0.14.2
Cloud or Self Hosted
Cloud
Steps to reproduce
(Probably unrelated but I want to say that we are a paid PRO SaaS user)
✔️ Expected Behavior
Successful retrieval of chunks from the dataset
❌ Actual Behavior
Cross-checked two behaviors:
Note: The behavior for number 1 also worked in the past but stopped working sometime during today (Jan 1)
You can see the comparison of two behaviors below:
Also, the full 524 error text is attached below:
The text was updated successfully, but these errors were encountered: