when i add searXng, show error
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.0.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
{ "code": "invalid_param", "message": "PluginInvokeError: {"args":{},"error_type":"ToolProviderCredentialValidationError","message":"Error 429: Too Many Requests"}", "status": 400 }
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@hecongyuan Hello! I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's squash those bugs together!
The error message you're encountering indicates a ToolProviderCredentialValidationError with a "Too Many Requests" (HTTP 429) error. This typically means that the SearXNG plugin is hitting a rate limit.
Here are some steps you can take to address this issue:
-
Check Rate Limits: Ensure that the SearXNG service you are using is not exceeding its rate limits. If you are self-hosting SearXNG, you might need to adjust its configuration to handle more requests or distribute the load more evenly.
-
Implement Backoff Strategy: Consider implementing a retry mechanism with exponential backoff in your application to handle rate-limited requests gracefully. This involves waiting for a certain period before retrying the request, and increasing the wait time with each subsequent retry.
-
Review Configuration: Double-check the configuration settings for SearXNG in your Dify setup. Ensure that all credentials and settings are correctly configured to avoid unnecessary request failures.
-
Monitor Usage: Keep an eye on the usage patterns to identify any spikes in request volume that might be causing the rate limit to be exceeded.
If these steps do not resolve the issue, you may need to look into optimizing the request patterns or scaling your SearXNG setup to handle more requests.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
same error occurred
I found the solution.
While you execute docker run searxng image, add -v ".\searxng:/etc/searxng" to the command. After the docker startup modify the settings.yml in the local .\searxng folder. Add - json in formats and restart the docker.
formats:
- html
- json
Addition to this issue. It also might be caused by the following statement in searxng/settings.yml.
server:
limiter: true # can be disabled for a private instance
If you set this to true and connect your searxng instance with redis, it may block bots and too many request from same IP. see this
So, who ran into this issue should check this and set it to false.
I wonder if there is a solution to set a whitelist with the limiter enabled?
Addition to this issue. It also might be caused by the following statement in
searxng/settings.yml.server: limiter: true # can be disabled for a private instance If you set this to true and connect your searxng instance with redis, it may block bots and too many request from same IP. see this
So, who ran into this issue should check this and set it to false.
I wonder if there is a solution to set a whitelist with the limiter enabled?
thinks! this is success