[PR #5938] [MERGED] feat: db pool config #5935 #44837

Closed
opened 2026-04-29 19:03:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/5938
Author: @nowheresly
Created: 10/6/2024
Status: Merged
Merged: 10/6/2024
Merged by: @tjbck

Base: devHead: fix5930


📝 Commits (1)

📊 Changes

3 files changed (+66 additions, -2 deletions)

View changed files

📝 .github/workflows/integration-test.yml (+3 -0)
📝 backend/open_webui/apps/webui/internal/db.py (+24 -2)
📝 backend/open_webui/env.py (+39 -0)

📄 Description

Pull Request Checklist

Changelog Entry

A connection pool can now be specified using env variables DATABASE_POOL_SIZE, DATABASE_POOL_MAX_OVERFLOW, DATABASE_POOL_RECYCLE and DATABASE_POOL_TIMEOUT

Description

  • this PR adds 4 env variables so that we can configure a pool for the database. It follows the documentation of SQLAlchemy here
  • in case the env variable DATABASE_POOL_SIZE is not configured or set to zero, then it falls back to no pool used at all like before. So it should not introduce any breaking change.

Added

  • The ability to configure a connection pool.

Fixed


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/5938 **Author:** [@nowheresly](https://github.com/nowheresly) **Created:** 10/6/2024 **Status:** ✅ Merged **Merged:** 10/6/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix5930` --- ### 📝 Commits (1) - [`9706b76`](https://github.com/open-webui/open-webui/commit/9706b76b36b18e3b1a97de0a868716995c52bf0c) feat: db pool config #5935 ### 📊 Changes **3 files changed** (+66 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/integration-test.yml` (+3 -0) 📝 `backend/open_webui/apps/webui/internal/db.py` (+24 -2) 📝 `backend/open_webui/env.py` (+39 -0) </details> ### 📄 Description # Pull Request Checklist # Changelog Entry A connection pool can now be specified using env variables DATABASE_POOL_SIZE, DATABASE_POOL_MAX_OVERFLOW, DATABASE_POOL_RECYCLE and DATABASE_POOL_TIMEOUT ### Description - this PR adds 4 env variables so that we can configure a pool for the database. It follows the documentation of SQLAlchemy [here](https://docs.sqlalchemy.org/en/20/core/pooling.html#module-sqlalchemy.pool) - in case the env variable DATABASE_POOL_SIZE is not configured or set to zero, then it falls back to no pool used at all like before. So it should not introduce any breaking change. ### Added - The ability to configure a connection pool. ### Fixed - It fixes #5935 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 19:03:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#44837