[GH-ISSUE #18316] issue: 0.6.33: When two or more Streamable(!) MCP servers are selected, the OpenWebUI-python3 process goes to 100% and stays there. #34090

Closed
opened 2026-04-25 08:00:41 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @netmb on GitHub (Oct 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/18316

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v.0.6.33

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04.3 LTS

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

If multiple Streamable MCP servers are enabled in the chat session, the Python process should not remain at 100% after the MCP server query has finished. No task exceptions should occur.

Actual Behavior

If multiple Streamable MCP servers are enabled in the chat session, after querying the MCP servers, the OpenWebui server process (/usr/local/bin/python3 -m uvicorn open_webui.main:app --host 0.0.0.0 --port 8080 --forwarded-allow) goes to 100% CPU load and stays there. The only thing that helps is to “kill” the process or restart the container.
A task exception is then displayed in the container log.

It does not matter which streamable MCP servers are selected—the error always occurs as soon as more than one server is selected. It also does not matter which LLM is in use (internal or external). Also tested with different streamable-MCP-Servers.

This leads to the exception:
Image

This works:
Image

Steps to Reproduce

  1. Select two Streamable-MCP-Servers:
    Image

  2. Ask your question (force tool-usage).

  3. Wait for response

  4. Check python-Process with "top" -> OpenWebUI-Python process is at 100%

  5. Check OpenWebUI-Container-Log. -> Task-Exception

Logs & Screenshots

OpenWebUI-Container-Log:

openwebui-1  | 2025-10-14 05:57:16.957 | ERROR    | asyncio.runners:run:118 - Task exception was never retrieved
openwebui-1  | future: <Task finished name='Task-1446' coro=<<async_generator_athrow without __name__>()> exception=RuntimeError('Attempted to exit cancel scope in a different task than it was entered in')>
openwebui-1  | Traceback (most recent call last):
openwebui-1  | 
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 781, in __aexit__
openwebui-1  |     raise BaseExceptionGroup(
openwebui-1  | 
openwebui-1  | BaseExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
openwebui-1  | 
openwebui-1  | 
openwebui-1  | During handling of the above exception, another exception occurred:
openwebui-1  | 
openwebui-1  | 
openwebui-1  | Traceback (most recent call last):
openwebui-1  | 
openwebui-1  | > File "/usr/local/lib/python3.11/site-packages/mcp/client/streamable_http.py", line 478, in streamablehttp_client
openwebui-1  |     async with anyio.create_task_group() as tg:
openwebui-1  |                │     │                      └ <anyio._backends._asyncio.TaskGroup object at 0x7dd0fcabcc50>
openwebui-1  |                │     └ <function create_task_group at 0x7dd2fc2bc220>
openwebui-1  |                └ <module 'anyio' from '/usr/local/lib/python3.11/site-packages/anyio/__init__.py'>
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 787, in __aexit__
openwebui-1  |     if self.cancel_scope.__exit__(type(exc), exc, exc.__traceback__):
openwebui-1  |        │    │            └ <function CancelScope.__exit__ at 0x7dd0fdc15760>
openwebui-1  |        │    └ <anyio._backends._asyncio.CancelScope object at 0x7dd0fcabfa50>
openwebui-1  |        └ <anyio._backends._asyncio.TaskGroup object at 0x7dd0fcabcc50>
openwebui-1  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 459, in __exit__
openwebui-1  |     raise RuntimeError(
openwebui-1  | 
openwebui-1  | RuntimeError: Attempted to exit cancel scope in a different task than it was entered in

OpenWebUI-Python-Process:
Image

Image

Additional Information

No response

Originally created by @netmb on GitHub (Oct 14, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/18316 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v.0.6.33 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04.3 LTS ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior If multiple Streamable MCP servers are enabled in the chat session, the Python process should not remain at 100% after the MCP server query has finished. No task exceptions should occur. ### Actual Behavior If multiple Streamable MCP servers are enabled in the chat session, after querying the MCP servers, the OpenWebui server process (/usr/local/bin/python3 -m uvicorn open_webui.main:app --host 0.0.0.0 --port 8080 --forwarded-allow) goes to 100% CPU load and stays there. The only thing that helps is to “kill” the process or restart the container. A task exception is then displayed in the container log. It does not matter which streamable MCP servers are selected—the error always occurs as soon as more than one server is selected. It also does not matter which LLM is in use (internal or external). Also tested with different streamable-MCP-Servers. This leads to the exception: <img width="762" height="196" alt="Image" src="https://github.com/user-attachments/assets/7d6f6466-a29d-4625-817a-abdb9fc7c4f2" /> This works: <img width="762" height="187" alt="Image" src="https://github.com/user-attachments/assets/801d3fb5-d957-436d-98c3-d741f7a850c8" /> ### Steps to Reproduce 1. Select two Streamable-MCP-Servers: <img width="762" height="196" alt="Image" src="https://github.com/user-attachments/assets/b054b370-cb59-4aec-a049-63c1e83327c2" /> 2. Ask your question (force tool-usage). 3. Wait for response 4. Check python-Process with "top" -> OpenWebUI-Python process is at 100% 5. Check OpenWebUI-Container-Log. -> Task-Exception ### Logs & Screenshots OpenWebUI-Container-Log: ``` openwebui-1 | 2025-10-14 05:57:16.957 | ERROR | asyncio.runners:run:118 - Task exception was never retrieved openwebui-1 | future: <Task finished name='Task-1446' coro=<<async_generator_athrow without __name__>()> exception=RuntimeError('Attempted to exit cancel scope in a different task than it was entered in')> openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 781, in __aexit__ openwebui-1 | raise BaseExceptionGroup( openwebui-1 | openwebui-1 | BaseExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception) openwebui-1 | openwebui-1 | openwebui-1 | During handling of the above exception, another exception occurred: openwebui-1 | openwebui-1 | openwebui-1 | Traceback (most recent call last): openwebui-1 | openwebui-1 | > File "/usr/local/lib/python3.11/site-packages/mcp/client/streamable_http.py", line 478, in streamablehttp_client openwebui-1 | async with anyio.create_task_group() as tg: openwebui-1 | │ │ └ <anyio._backends._asyncio.TaskGroup object at 0x7dd0fcabcc50> openwebui-1 | │ └ <function create_task_group at 0x7dd2fc2bc220> openwebui-1 | └ <module 'anyio' from '/usr/local/lib/python3.11/site-packages/anyio/__init__.py'> openwebui-1 | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 787, in __aexit__ openwebui-1 | if self.cancel_scope.__exit__(type(exc), exc, exc.__traceback__): openwebui-1 | │ │ └ <function CancelScope.__exit__ at 0x7dd0fdc15760> openwebui-1 | │ └ <anyio._backends._asyncio.CancelScope object at 0x7dd0fcabfa50> openwebui-1 | └ <anyio._backends._asyncio.TaskGroup object at 0x7dd0fcabcc50> openwebui-1 | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 459, in __exit__ openwebui-1 | raise RuntimeError( openwebui-1 | openwebui-1 | RuntimeError: Attempted to exit cancel scope in a different task than it was entered in ``` OpenWebUI-Python-Process: <img width="575" height="30" alt="Image" src="https://github.com/user-attachments/assets/102c2399-bdbb-4dd4-8955-073b339dec3e" /> <img width="1124" height="32" alt="Image" src="https://github.com/user-attachments/assets/65894623-8f6b-47de-8940-68a5bdba2bcf" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 08:00:41 -05:00
Author
Owner

@tjbck commented on GitHub (Oct 14, 2025):

Unable to reproduce

<!-- gh-comment-id:3402284609 --> @tjbck commented on GitHub (Oct 14, 2025): Unable to reproduce
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#34090