enh: Optimize Open WebUI Web Search to Prevent CPU Stalls #2184

Closed
opened 2025-11-11 15:01:52 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @chrisoutwright on GitHub (Sep 24, 2024).

Bug Report

When using web search in Open WebUI, I encounter a CPU stall that causes my PC to freeze. This issue seems to be more prevalent when there are multiple concurrent search requests or a high number of search results (12,12 for example). The system logs show that the RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS settings are being loaded but it appears that these settings might not be effectively managing the load. There should be a way to limit the total amount of cores so that the stalling can be prevented.

Installation Method

Manual Install according to:

git clone https://github.com/open-webui/open-webui.git
cd open-webui
copy .env.example .env
npm install
npm run build
cd .\backend
# Optional: To install using Conda as your development 
environment, follow these instructions:
# Create and activate a Conda environment
conda create --name open-webui-env python=3.11
conda activate open-webui-env
pip install -r requirements.txt -U

Environment

  • Open WebUI Version: [v0.3.28]

  • Ollama (if applicable): [v0.3.11]

  • Operating System: [e.g., Windows 10]

  • Browser (if applicable): [e.g., Chrome Version 129.0.6668.59 (Official Build) (64-bit)]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.

  • I am on the latest version of both Open WebUI and Ollama.

  • I have included console logs.

  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

The web search function in Open WebUI should operate smoothly without causing a CPU stall or system freeze, even when handling multiple concurrent search requests or a high number of search results. The settings RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS should effectively manage the load to prevent performance issues.

Additionally, there should be an option to limit the total number of CPU cores used by the web search process to ensure stable system performance.

Actual Behavior:

When using the web search function in Open WebUI, the system frequently experiences a CPU stall that causes the PC to freeze. This issue is particularly prevalent when there are multiple concurrent search requests or a high number of search results (e.g., 12 or more). Despite the settings RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS being loaded, they do not seem to effectively manage the load.

Configuration Details:
Web Search:
Enable Web Search: Enabled
Web Search Engine: searxng
Searxng Query URL: different server than open-webui being hosted
Search Result Count: 12
Concurrent Requests: 12

Description

Bug Summary:
When using web search in Open WebUI, I encounter a CPU stall that causes my PC to freeze. This issue seems to be more prevalent when there are multiple concurrent search requests or a high number of search results (12,12 for example).

The system logs show that the RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS settings are being loaded but it appears that these settings might not be effectively managing the load. There should be a way to limit the total amount of cores so that the stalling can be prevented.

Reproduction Details

Steps to Reproduce:

  1. Set Configuration Values:

    • Navigate to Settings → Web Search.
    • Set the RAG_WEB_SEARCH_RESULT_COUNT to a value like 10(or any higher value).
    • Set the RAG_WEB_SEARCH_CONCURRENT_REQUESTS to a value like 10 (or any higher value).
  2. Perform Web Searches:

    • Open the web search feature in Open WebUI.
    • Perform multiple concurrent searches by opening several tabs or using quick successive queries.
    • Alternatively, perform a single search with a query that returns a large number of results.
  3. Observe System Behavior:

    • Monitor CPU usage and system responsiveness.
    • Notice that the CPU usage spikes significantly, leading to a stall.
    • Observe that the PC becomes unresponsive and may freeze for an extended period.

Logs and Screenshots

Browser Console Logs:
n.A.

Screenshots/Screen Recordings (if applicable):
n.A.

Originally created by @chrisoutwright on GitHub (Sep 24, 2024). # Bug Report When using web search in Open WebUI, I encounter a CPU stall that causes my PC to freeze. This issue seems to be more prevalent when there are multiple concurrent search requests or a high number of search results (12,12 for example). The system logs show that the RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS settings are being loaded but it appears that these settings might not be effectively managing the load. There should be a way to limit the total amount of cores so that the stalling can be prevented. ## Installation Method Manual Install according to: ``` git clone https://github.com/open-webui/open-webui.git cd open-webui copy .env.example .env npm install npm run build cd .\backend # Optional: To install using Conda as your development environment, follow these instructions: # Create and activate a Conda environment conda create --name open-webui-env python=3.11 conda activate open-webui-env pip install -r requirements.txt -U ``` ## Environment - **Open WebUI Version:** [v0.3.28] - **Ollama (if applicable):** [v0.3.11] - **Operating System:** [e.g., Windows 10] - **Browser (if applicable):** [e.g., Chrome Version 129.0.6668.59 (Official Build) (64-bit)] **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included console logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: The web search function in Open WebUI should operate smoothly without causing a CPU stall or system freeze, even when handling multiple concurrent search requests or a high number of search results. The settings RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS should effectively manage the load to prevent performance issues. Additionally, there should be an option to limit the total number of CPU cores used by the web search process to ensure stable system performance. ## Actual Behavior: When using the web search function in Open WebUI, the system frequently experiences a CPU stall that causes the PC to freeze. This issue is particularly prevalent when there are multiple concurrent search requests or a high number of search results (e.g., 12 or more). Despite the settings RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS being loaded, they do not seem to effectively manage the load. Configuration Details: Web Search: Enable Web Search: Enabled Web Search Engine: searxng Searxng Query URL: different server than open-webui being hosted Search Result Count: 12 Concurrent Requests: 12 ## Description **Bug Summary:** When using web search in Open WebUI, I encounter a CPU stall that causes my PC to freeze. This issue seems to be more prevalent when there are multiple concurrent search requests or a high number of search results (12,12 for example). The system logs show that the RAG_WEB_SEARCH_RESULT_COUNT and RAG_WEB_SEARCH_CONCURRENT_REQUESTS settings are being loaded but it appears that these settings might not be effectively managing the load. There should be a way to limit the total amount of cores so that the stalling can be prevented. ## Reproduction Details **Steps to Reproduce:** 1. **Set Configuration Values:** - Navigate to Settings → Web Search. - Set the `RAG_WEB_SEARCH_RESULT_COUNT` to a value like 10(or any higher value). - Set the `RAG_WEB_SEARCH_CONCURRENT_REQUESTS` to a value like 10 (or any higher value). 2. **Perform Web Searches:** - Open the web search feature in Open WebUI. - Perform multiple concurrent searches by opening several tabs or using quick successive queries. - Alternatively, perform a single search with a query that returns a large number of results. 3. **Observe System Behavior:** - Monitor CPU usage and system responsiveness. - Notice that the CPU usage spikes significantly, leading to a stall. - Observe that the PC becomes unresponsive and may freeze for an extended period. ## Logs and Screenshots **Browser Console Logs:** n.A. **Screenshots/Screen Recordings (if applicable):** n.A.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#2184