mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
BUG: Postgres database slows down for admin section after adding large amount of users #2675
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?
Originally created by @beastech on GitHub (Nov 18, 2024).
Installation Method
Docker
Environment
Open WebUI Version: v0.3.35
Operating System: Azure App Service
-Database: External Postgres database
Confirmation:
Expected Behavior:
When using the built in sqlite database click on "Admin Panel", users appear quickly on the screen. Changing between pending, user, and admin is pretty much instantaneous, even with 100+ users.
Actual Behavior:
When using an external postgres database with 100+ users the system begins to bog down when clicking on "Admin Panel" and takes a long time for it to load the table on the screen. Making a change to a user, such as switching roles takes just as long. The more users added, the longer it takes to load.
Description
Bug Summary:
External postgres database takes a very long time to load users in the admin section if you have a lot of users. This may happen with external sqlite database as well but I do not have this option available to me to test in my current environment.
Reproduction Details
external postgres database.
environment variable: DATABASE_URL=postgres://:/
I'm using Azure and hosting as an app service, pointing to a postgres database in the same subscription. The only option I have on the database is sslmode=require and user\pass.
Steps to Reproduce:
Set up external postgres database.
Connect OWUI to database using environment variable: DATABASE_URL=postgres://:/
Add 100 users under "Admin Panel".
Click out of admin panel, go back to admin panel and wait. Eventually the users will appear.
Additional Info*
The database is working, the admin panel is the only part that seems to have an issue. When users are prompting, getting responses, logging in, etc. everything seems fine.