Troubleshooting Web Search
Web Search in Open WebUI allows language models to access real-time information from the internet. When things don't work as expected, this guide will help you diagnose and fix common issues.
Common Web Search Issues and How to Fix Them 🛠️
1. Web Search Fails Behind HTTP Proxy 🌐🔒
If you're running Open WebUI behind an HTTP proxy, you might notice that web search queries succeed (e.g., SearXNG returns results), but the subsequent content fetching fails with errors like:
[Errno -3] Temporary failure in name resolutionConnection timeout to hostThe content provided is empty
This happens because the web content fetcher doesn't use your http_proxy/https_proxy environment variables by default.
✅ Solution:
- Navigate to: Admin Panel > Settings > Web Search
- Enable Trust Proxy Environment
- Save changes
Alternatively, set the environment variable WEB_SEARCH_TRUST_ENV:
WEB_SEARCH_TRUST_ENV=True
This is a PersistentConfig variable, meaning it can be set via environment variable on startup OR configured through the Admin Panel UI. Once set in the UI, the database value takes precedence over the environment variable.
This setting tells Open WebUI's web content loader to respect the proxy settings from your environment variables (http_proxy, https_proxy). Without this, even if your search engine works through the proxy, fetching content from the returned URLs will fail.
2. 403 Forbidden Errors from SearXNG
If you're using SearXNG and seeing 403 Client Error: Forbidden in your logs, the JSON format is not enabled.
✅ Solution:
Edit your SearXNG settings.yml and add json to the formats list:
search:
formats:
- html
- json
Restart SearXNG after making this change.
3. Empty Content or Poor Results
If web search returns empty content or poor quality results, the issue is often related to context window size or content extraction.
✅ Solutions:
-
Increase context length: Web pages often contain 4,000-8,000+ tokens. If your model has a 2048-token limit, you're missing most of the content. Increase to 16384+ tokens in Admin Panel > Models > Settings > Advanced Parameters (anything below will be subpar for web content).
-
Check result count: Adjust
WEB_SEARCH_RESULT_COUNTto control how many results are fetched. -
Try different loaders: Configure
WEB_LOADER_ENGINEto useplaywrightfor JavaScript-heavy sites orfirecrawl/tavilyfor better extraction.
For more details on context window issues, see the RAG Troubleshooting Guide.
4. Connection Timeouts
If web searches are timing out:
✅ Solutions:
-
Reduce concurrent requests: Set
WEB_SEARCH_CONCURRENT_REQUESTS=1for sequential execution (required for Brave free tier). -
Adjust loader concurrency: Lower
WEB_LOADER_CONCURRENT_REQUESTSif fetching many pages simultaneously. -
Check network connectivity: Ensure Open WebUI can reach both the search engine and the result URLs.
Environment Variables Reference
For a comprehensive list of all web search environment variables, see the Environment Configuration documentation.
Key variables:
| Variable | Description |
|---|---|
WEB_SEARCH_TRUST_ENV | Enable proxy support for content fetching |
WEB_SEARCH_RESULT_COUNT | Number of search results to fetch |
WEB_SEARCH_CONCURRENT_REQUESTS | Concurrent requests to search engine |
WEB_LOADER_CONCURRENT_REQUESTS | Concurrent page fetches |
WEB_LOADER_ENGINE | Content extraction engine |
Still Having Issues?
If you're still experiencing problems:
- Check the Open WebUI logs for detailed error messages
- Verify your search engine configuration is correct
- Test connectivity from the Open WebUI container to your search engine
- Review all Web Search environment variables for additional configuration options