mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #13031] [MERGED] feat: Add support for configuring FastAPI/AnyIO Thread Pool #23078
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/13031
Author: @gaby
Created: 4/18/2025
Status: ✅ Merged
Merged: 4/19/2025
Merged by: @tjbck
Base:
dev← Head:anyio-workers📝 Commits (4)
19b3d88Add support for configuring FastAPI/AnyIO Thread Pool Sizee19554eSimplify importf77f6cdUpdate imports to match anyio docs62f87c2Use default AnyIO pool size📊 Changes
4 files changed (+21 additions, -5 deletions)
View changed files
📝
backend/open_webui/config.py(+3 -0)📝
backend/open_webui/main.py(+8 -0)📝
backend/open_webui/routers/knowledge.py(+2 -1)📝
backend/open_webui/routers/users.py(+8 -4)📄 Description
Description
40threads for the whole application. These threads are used by any non-async or threaded function. This PR adds support for configuring this value viaENV,it also bumps the default value to 64 threads.non-asynccalls.Implementation Source: https://github.com/Kludex/fastapi-tips#2-be-careful-with-non-async-functions
AnyIO Docs: https://www.starlette.io/threadpool/#concurrency-limitations
Related: https://github.com/open-webui/open-webui/pull/12958
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.