[GH-ISSUE #4884] Any chat that takes longer than 30 seconds to reply fails, very long context chats always fail first time #13773

Closed
opened 2026-04-19 20:23:27 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @matatonic on GitHub (Aug 24, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/4884

Bug Report

Installation Method

Official docker

Environment

  • Open WebUI Version: v0.3.14

  • Ollama (if applicable): NA

  • Operating System: Ubuntu 22.04

  • Browser (if applicable): Firefox 129.0.2 or Chromium 127.0.6533.99

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 the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

A long context chat, or slow operation (such as generating many minutes of speech audio) should continue to work after more than 30 seconds.

Actual Behavior:

In a long context chat, starting from a cold context cache, a chat request can take a while to warm up the cache, but after 30 seconds without any reply the UI seems to fail and no text is produced. With very large context (100k) even api.groq.com isn't fast enough to start producing text in this time.

Description

Bug Summary:
Any chat (or related action, such as generating speech) which takes more than 30 seconds is aborted.

Reproduction Details

Steps to Reproduce:
Load a 100k context into chat, ask for a reply.

Logs and Screenshots

Browser Console Logs:
N/A

Docker Container Logs:

open-webui  | INFO:     192.168.239.14:0 - "GET /api/v1/configs/banners HTTP/1.1" 200 OK
open-webui  | INFO:     192.168.239.14:0 - "GET /api/v1/functions/ HTTP/1.1" 200 OK
open-webui  | INFO:     192.168.239.14:0 - "GET /api/v1/tools/ HTTP/1.1" 200 OK
open-webui  | INFO:     192.168.239.14:0 - "GET /api/v1/prompts/ HTTP/1.1" 200 OK
open-webui  | INFO:     192.168.239.14:0 - "GET /api/v1/chats/tags/all HTTP/1.1" 200 OK
open-webui  | ERROR:    Exception in ASGI application
open-webui  |   + Exception Group Traceback (most recent call last):
open-webui  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
open-webui  |   |     yield
open-webui  |   |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
open-webui  |   |     async with anyio.create_task_group() as task_group:
open-webui  |   |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
open-webui  |   |     raise BaseExceptionGroup(
open-webui  |   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
open-webui  |   +-+---------------- 1 ----------------
open-webui  |     | Traceback (most recent call last):
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
open-webui  |     |     result = await app(  # type: ignore[func-returns-value]
open-webui  |     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
open-webui  |     |     return await self.app(scope, receive, send)
open-webui  |     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
open-webui  |     |     await super().__call__(scope, receive, send)
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
open-webui  |     |     await self.middleware_stack(scope, receive, send)
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
open-webui  |     |     raise exc
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
open-webui  |     |     await self.app(scope, receive, _send)
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
open-webui  |     |     with collapse_excgroups():
open-webui  |     |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
open-webui  |     |     self.gen.throw(typ, value, traceback)
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
open-webui  |     |     raise exc
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
open-webui  |     |     response = await self.dispatch_func(request, call_next)
open-webui  |     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |     |   File "/app/backend/main.py", line 798, in update_embedding_function
open-webui  |     |     response = await call_next(request)
open-webui  |     |                ^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |     |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 166, in call_next
open-webui  |     |     raise RuntimeError("No response returned.")
open-webui  |     | RuntimeError: No response returned.
open-webui  |     +------------------------------------
open-webui  | 
open-webui  | During handling of the above exception, another exception occurred:
open-webui  | 
open-webui  | Traceback (most recent call last):
open-webui  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
open-webui  |     result = await app(  # type: ignore[func-returns-value]
open-webui  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
open-webui  |     return await self.app(scope, receive, send)
open-webui  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
open-webui  |     await super().__call__(scope, receive, send)
open-webui  |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
open-webui  |     await self.middleware_stack(scope, receive, send)
open-webui  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
open-webui  |     raise exc
open-webui  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
open-webui  |     await self.app(scope, receive, _send)
open-webui  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
open-webui  |     with collapse_excgroups():
open-webui  |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
open-webui  |     self.gen.throw(typ, value, traceback)
open-webui  |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
open-webui  |     raise exc
open-webui  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
open-webui  |     response = await self.dispatch_func(request, call_next)
open-webui  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |   File "/app/backend/main.py", line 798, in update_embedding_function
open-webui  |     response = await call_next(request)
open-webui  |                ^^^^^^^^^^^^^^^^^^^^^^^^
open-webui  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 166, in call_next
open-webui  |     raise RuntimeError("No response returned.")
open-webui  | RuntimeError: No response returned.
open-webui  | ERROR [apps.openai.main] Connection error: 

Screenshots/Screen Recordings (if applicable):

image

Additional Information

My whole setup uses various openai compatible API's, so I don't know if it's related to anything else, or if it's an openai api client issue. The default OpenAI API client timeout should be 10 minutes. I've tried setting:

OPENAI_TIMEOUT=600
#and
AIOHTTP_CLIENT_TIMEOUT=600

But that doesn't fix anything, still failed after 30 seconds.

Originally created by @matatonic on GitHub (Aug 24, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/4884 # Bug Report ## Installation Method Official docker ## Environment - **Open WebUI Version:** v0.3.14 - **Ollama (if applicable):** NA - **Operating System:** Ubuntu 22.04 - **Browser (if applicable):** Firefox 129.0.2 or Chromium 127.0.6533.99 **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 the browser console logs. - [X] I have included the Docker container logs. - [X] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: A long context chat, or slow operation (such as generating many minutes of speech audio) should continue to work after more than 30 seconds. ## Actual Behavior: In a long context chat, starting from a cold context cache, a chat request can take a while to warm up the cache, but after 30 seconds without any reply the UI seems to fail and no text is produced. With very large context (100k) even api.groq.com isn't fast enough to start producing text in this time. ## Description **Bug Summary:** Any chat (or related action, such as generating speech) which takes more than 30 seconds is aborted. ## Reproduction Details **Steps to Reproduce:** Load a 100k context into chat, ask for a reply. ## Logs and Screenshots **Browser Console Logs:** N/A **Docker Container Logs:** ``` open-webui | INFO: 192.168.239.14:0 - "GET /api/v1/configs/banners HTTP/1.1" 200 OK open-webui | INFO: 192.168.239.14:0 - "GET /api/v1/functions/ HTTP/1.1" 200 OK open-webui | INFO: 192.168.239.14:0 - "GET /api/v1/tools/ HTTP/1.1" 200 OK open-webui | INFO: 192.168.239.14:0 - "GET /api/v1/prompts/ HTTP/1.1" 200 OK open-webui | INFO: 192.168.239.14:0 - "GET /api/v1/chats/tags/all HTTP/1.1" 200 OK open-webui | ERROR: Exception in ASGI application open-webui | + Exception Group Traceback (most recent call last): open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups open-webui | | yield open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__ open-webui | | async with anyio.create_task_group() as task_group: open-webui | | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__ open-webui | | raise BaseExceptionGroup( open-webui | | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception) open-webui | +-+---------------- 1 ---------------- open-webui | | Traceback (most recent call last): open-webui | | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi open-webui | | result = await app( # type: ignore[func-returns-value] open-webui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__ open-webui | | return await self.app(scope, receive, send) open-webui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ open-webui | | await super().__call__(scope, receive, send) open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__ open-webui | | await self.middleware_stack(scope, receive, send) open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__ open-webui | | raise exc open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__ open-webui | | await self.app(scope, receive, _send) open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ open-webui | | with collapse_excgroups(): open-webui | | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ open-webui | | self.gen.throw(typ, value, traceback) open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups open-webui | | raise exc open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ open-webui | | response = await self.dispatch_func(request, call_next) open-webui | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | | File "/app/backend/main.py", line 798, in update_embedding_function open-webui | | response = await call_next(request) open-webui | | ^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 166, in call_next open-webui | | raise RuntimeError("No response returned.") open-webui | | RuntimeError: No response returned. open-webui | +------------------------------------ open-webui | open-webui | During handling of the above exception, another exception occurred: open-webui | open-webui | Traceback (most recent call last): open-webui | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi open-webui | result = await app( # type: ignore[func-returns-value] open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__ open-webui | return await self.app(scope, receive, send) open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ open-webui | await super().__call__(scope, receive, send) open-webui | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__ open-webui | await self.middleware_stack(scope, receive, send) open-webui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__ open-webui | raise exc open-webui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__ open-webui | await self.app(scope, receive, _send) open-webui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__ open-webui | with collapse_excgroups(): open-webui | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ open-webui | self.gen.throw(typ, value, traceback) open-webui | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups open-webui | raise exc open-webui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__ open-webui | response = await self.dispatch_func(request, call_next) open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | File "/app/backend/main.py", line 798, in update_embedding_function open-webui | response = await call_next(request) open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^ open-webui | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 166, in call_next open-webui | raise RuntimeError("No response returned.") open-webui | RuntimeError: No response returned. open-webui | ERROR [apps.openai.main] Connection error: ``` **Screenshots/Screen Recordings (if applicable):** ![image](https://github.com/user-attachments/assets/2c46f334-688c-4cbb-8bf8-e4caead4ba6f) ## Additional Information My whole setup uses various openai compatible API's, so I don't know if it's related to anything else, or if it's an openai api client issue. The default OpenAI API client timeout should be 10 minutes. I've tried setting: ``` OPENAI_TIMEOUT=600 #and AIOHTTP_CLIENT_TIMEOUT=600 ``` But that doesn't fix anything, still failed after 30 seconds.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#13773