mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-30 17:11:20 -05:00
[GH-ISSUE #23939] issue: Loading and login issue after upgrading to 0.9.0 and 0.9.1 #123426
Reference in New Issue
Block a user
Originally created by @Joly0 on GitHub (Apr 21, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23939
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.9.1
Ollama Version (if applicable)
No response
Operating System
Debian 12
Browser (if applicable)
Firefox, Edge (both latest stable)
Confirmation
README.md.Expected Behavior
Login should work same as in 0.8.12
Actual Behavior
After upgrading to 0.9.0 today i noticed that loading the webui was slower than usual. I noticed that the /api/config endpoint took about 16 seconds to load and then open-webui redirects me to my oidc login (entra id), but that login never really succeeds as it did before, it just keeps loading indefinitely:
Going back to 0.8.12 instantly solves those problems and login works properly (dont even have to manually login, i am automatically logged in).
Steps to Reproduce
Installed open-webui using docker compose with traefik reverse proxy with entra id as oidc provider.
Logs & Screenshots
Not sure if relevant, but this is the only error i could find in the logs of the open-webui container on startup:
Additional Information
No response
@Classic298 commented on GitHub (Apr 21, 2026):
Are you on postgreSQL or sqlite?
What's your db pool size?
Do you use db session sharing?
@Classic298 commented on GitHub (Apr 21, 2026):
needs your full DB configuration and full startup logs to pinpoint.
@Classic298 commented on GitHub (Apr 21, 2026):
The 16s slowness is most likely poor configuration or network issues or database latency. The backend does not take 16s to run the queries for the config endpoint
Probably your db sessions are saturated and therefore the backend is artificially blocked.
@Classic298 commented on GitHub (Apr 21, 2026):
Do you use uvicorn workers? Redis? Some other scaling?
@Joly0 commented on GitHub (Apr 21, 2026):
Sure, no problem. Here is the startup logs:
Database is sqlite using all default settings. Here is the compose with the open-webui config:
Other than that, no other database or redis or so
@Classic298 commented on GitHub (Apr 21, 2026):
is it used by multiple users? is the slowness perchance only when someone uploads a file? whats your document extraction engine, embedding model and vector database?
@Joly0 commented on GitHub (Apr 21, 2026):
Yes, its used by a bunch of users. What do you mean the slowness perchance only when someone uploads a file? As described, this happens DIRECTLY after starting the container, so there is no chance that there could be any user already uploading files anywhere. And so far there were no problems, it just started today after updating to 0.9.0 and also after updating to 0.9.1. Also going back to 0.8.12 seems to instantly solve the problems i am experiencing
@Joly0 commented on GitHub (Apr 21, 2026):
Also even in prime-time when a lot of users were using open-webui there were never any problems with slowness or similar, but i am currently UNABLE to even login, it just stopped letting me login, which never happened before
@Classic298 commented on GitHub (Apr 21, 2026):
Thanks for the config, that narrows it down a bit. You're on plain SQLite with defaults (WAL on, busy_timeout 5s, async pool 512), single container.
For that setup, 16s on
/api/configis not DB latencyA few things to help narrow this down:
Is the 16s only on the first request after container start, or on every subsequent request too? The lifespan does sync work on startup (embedding model load,
install_tool_and_function_dependencies(), tool-server init, optional models cache pre-fetch). Cold-start stalls of 1min are plausible. If later/api/configcalls are fast, it's just the frontend hitting the endpoint earlier in the flow than before, not a per-request regression.Where does the OIDC login get stuck — on
login.microsoftonline.comor back on your OWUI domain? If it hangs on Entra's side, it's likely a redirect_uri / cookie / state issue. If it hangs on the OWUI callback URL, the backend is stalling in the callback handler.Please re-run with
GLOBAL_LOG_LEVEL=DEBUGand share the log from clicking "Sign in" until it hangs. That will show whetherauthorize_access_token/userinfoare actually returning.Try these two env vars as a quick test:
ENABLE_BASE_MODELS_CACHE=false(skips the startup model pre-fetch)DATABASE_SQLITE_PRAGMA_BUSY_TIMEOUT=30000Then report whether
/api/configand the login flow behave any differently.The
KeyError: '...'onenter_roomis a socketio race. The client disconnected beforeenter_roomfinished. It's a symptom of the reconnect/login loop, not the cause.@Joly0 commented on GitHub (Apr 21, 2026):
/api/v1/chats/?page=1):login.microsoftonline.compage after login when it is trying to redirect me back to my owui instance. I can see that thecallback?code=XYZendpoint is stuck on pending for a while, before finally sending me back to owui where i am then stuck again for quite a while@Classic298 commented on GitHub (Apr 21, 2026):
Thanks for the logs. Two important data points:
/api/v1/chats/?page=1 taking 2 minutes is pathological, that's a query blocked on I/O or locks. Same with the 13-second gap in your log between GET / (14:00:12) and the first outbound call to Azure (14:00:25). The OIDC "hang" is just the same slowness hitting the callback path.
The snippet shows PRAGMA journal_mode=WAL executing without a matching completed line.
A few more things to narrow it down:
Where does the /data/open-webui volume live? Local SSD, spinning disk, NFS, CIFS, k8s PVC backed by network storage, remote? SQLite + WAL on network-attached storage is catastrophically slow because WAL relies on mmap / fsync semantics that don't work well over NFS. So I really need to know what and where your data folder is and on what storage your sqlite lives. 0.8.12 was synchronous SQLAlchemy so contention was serialized in-process; 0.9.x is async with aiosqlite, which opens connections across threads and hammers the filesystem harder. Slow filesystem/slow storage will kill you. If the volume is network-backed, this is the most likely root cause.
Try as a diagnostic:
This forces a single async connection (serialized) and tells us whether the problem is pool/threading contention or something more fundamental. If performance improves noticeably, it's definitely an async-pool-on-SQLite issue.
Test /api/config directly, bypassing Traefik. Run this from inside the container or from any container on the same Docker network:
docker exec open-webui curl -s -o /dev/null -w "%{time_total}\n" http://localhost:8080/api/config
If it's fast there but slow through Traefik, the culprit is proxy-side. If it's also slow there, it's 100% app + DB.
Please share the full unfiltered DEBUG log of a single login attempt (from clicking "Sign in" to the hang). The snippet has a 13s gap with no log output, but at DEBUG you should see aiosqlite and httpcore lines continuously. Whatever's happening in that gap is the bug.
Size of webui.db also helpful — ls -lh /data/open-webui/webui.db*.
@Classic298 commented on GitHub (Apr 21, 2026):
Most likely, your setup's problem is either the storage being slow (low I/O and/or huge latency handling async poorly) or pathological aiosqlite behavior on a large DB. The three diagnostics we need (storage type + db size, DATABASE_POOL_SIZE=1, direct curl past Traefik) will tell us which.
@Joly0 commented on GitHub (Apr 21, 2026):
Ok, so the volume is on an nfs storage thats mounted on the host. The storage itself is ssd based.
Setting the variable
DATABASE_POOL_SIZE=1seems to solve the problem. The curl command also shows no problem:Though removing those variables
currentlyseems to still leave the owui instance in a working state@Joly0 commented on GitHub (Apr 21, 2026):
Also the webui.db is currently 906MB
@Classic298 commented on GitHub (Apr 21, 2026):
ok so this is most definitely an I/O bound limitation of your NFS mounted storage. I will make sure to document that.
Recommendations, in order of robustness:
The fact that performance is still OK after removing the vars is likely just because the pool is warm now and isn't churning. It'll degrade again under load or after restart — please keep DATABASE_POOL_SIZE=1 (or migrate off NFS) for a durable fix.
Not a bug per se — it's working as designed, the design just doesn't assume NFS. Worth filing a docs/defaults note though - and i will add it to the docs.
@Classic298 commented on GitHub (Apr 21, 2026):
@tjbck can we transfer this to the docs repo please?
@Joly0 commented on GitHub (Apr 21, 2026):
Alright, noted. Thanks for assisting here. I will check for possibilities on my end to move away from NFS storage (not a big fan of that solution, but it worked good until now), otherwise i will try and migrate to postgresql. Are there any docs regarding migrating from sqlite to postgres?
@13krsnaa commented on GitHub (Apr 21, 2026):
I checked the issue and I think I can work on this. Please let me know if it is still available.
@Classic298 commented on GitHub (Apr 21, 2026):
@13krsnaa there is nothing to work on unless you want to submit a PR to the docs
@Joly0 commented on GitHub (Apr 22, 2026):
Hey, just wanted to ask what i can do here:
I have currently set:
but i cannot access open-webui currently because of that error. I thought the database_pool_size variable should help in this case?
@VonNao commented on GitHub (Apr 22, 2026):
If tested i bit more. We deployed openwebui in kubernetes via ceph. Our staging deployment uses sqllite and we also find a database lock error.
I tried DATABASE_POOL_SIZE: 1 in the deployment but it dosent seem to change much.
User at this point was just me.
@Classic298 commented on GitHub (Apr 22, 2026):
@Joly0 if you set it to 3, then there can only be 3 connections at a time
If you set it to 1 it will create a new connection object for every call
@Joly0 commented on GitHub (Apr 22, 2026):
I tried with 1 and its still throwing the same error just with 1 instead of 3 in the error message. So it seems like even with that variable no matter what i set it to, my open-webui instance becomes unusable after some time
@Joly0 commented on GitHub (Apr 22, 2026):
Same error with other values (eg. 5 or 10)
@Classic298 commented on GitHub (Apr 22, 2026):
On the SQLite path only
pool_sizeis set, so SQLAlchemy's defaultmax_overflow=10still applies —=1means up to 11 concurrent connections,=3means 13,=5means 15. Tweaking the value just moves the breaking point, doesn't fix the cause.@VonNao Ceph is the same story as NFS: slow
fsync+ high per-op latency. aiosqlite opens each connection on its own thread doing its ownfsync, connections stay checked out for seconds on slow storage, the pool saturates,pool_timeout=30trips. No pool size will fix this.Real fixes:
DATABASE_URL=postgresql+asyncpg://...). Strongly recommended for k8s — Postgres handles its own storage, your volume latency stops being in the hot path.Short-term damage control if you're stuck:
ENABLE_AUTOMATIONS=falseremoves the scheduler's 10 s poll,DATABASE_POOL_TIMEOUT=120delays the 500s. Won't save you under real load.You can also increase the automator's poll timer but that won't fix anything
@Joly0 commented on GitHub (Apr 22, 2026):
Ok, so whats the best solution here? From reading your comments it seems like postgres isnt the best approach either (or i am reading it wrong). Also if it is the best, is there official documentation to migrate from sqlite to postgres properly?
Problem is, i use docker swarm, therefore i have to use some sort of shared storage for the database for sqlite (and even if i use postgres it would be in the same compose stack, so also running on swarm and would also need shared storage, which currently is nfs). So for shared storage nfs is not really a solution but ceph neither?
@Joly0 commented on GitHub (Apr 22, 2026):
For migration from sqlite to postgres i could only find this https://ciodave.medium.com/migrating-open-webui-sqlite-database-to-postgresql-8efe7b2e4156 or an old tool here on github, but that seems to be outdated
@Classic298 commented on GitHub (Apr 22, 2026):
You misread me — Postgres IS the right answer. Let me be direct, citing the official docs:
From https://docs.openwebui.com/reference/env-configuration#database-pool
Relevant reading:
From scaling:
From performance:
So what you're running right now is officially unsupported. That's the whole reason you're seeing this.
Your entire setup the way you operate it is completely unsupported and WILL break as documented. @Joly0 @VonNao
For Docker Swarm, do this:
placement constraintpinning it to one node, and use a local volume on that node (not NFS). Only Postgres touches its data dir — no need for shared storage. If that node dies, you restart the service on another node and restore from backup; that's the standard pattern.REDIS_URL,WEBSOCKET_MANAGER=redis), shareWEBUI_SECRET_KEY, and setENABLE_DB_MIGRATIONS=falseon all replicas except one.On migrating existing data: there is no built-in migration. Per the env docs: "Changing the URL does not migrate data between databases."
@taylorwilsdon built a community migration tool but use at your own risk and due diligence https://github.com/taylorwilsdon/open-webui-postgres-migration
NFS/Ceph for your files/uploads is fine — per the scaling doc, "multiple processes and replicas only ever create new files or read existing ones — they never write to the same file simultaneously." Only the SQLite DB file is the problem.
@Classic298 commented on GitHub (Apr 22, 2026):
@Joly0
just for ... understanding. i asked you earlier if you used any form of scaling, you said no - and you also said you don't use redis
but NOW you said you use docker swarm
how does that work out?
@Joly0 commented on GitHub (Apr 22, 2026):
I may have misread what you asked for when you asked for scaling, but for your question
Do you use uvicorn workers? Redis? Some other scaling?i answered withOther than that, no other database or redis or so. I am not using any kind of "scaling", open-webui is running on docker swarm, but always as/on a single node/instance. Docker swarm is only for HA (so if a node dies), not really for scaling, but i see what you mean and it was definitely me misunderstanding what you actually asked for with that question. But its still correct that i am not using redis or any other db.Though i thought it was clear that i am using some sort of docker orchestrator, i do not see any other reason to use shared storage through nfs if not for that.
@Classic298 commented on GitHub (Apr 22, 2026):
@Joly0 ok thanks that makes sense
i stopped making assumptions of people's setups after someone said they run Open WebUI on a machine with 128 cores and 2TB RAM but only gave it 1 mCPU (1 milli CPU) and 128 MB RAM. xd
@Joly0 commented on GitHub (Apr 22, 2026):
Ye, thats totally reasonable. Definitely sorry for leaving out that information, or better for not clarifying it clearer when you asked for it. You are giving awesome support and i should have given you as much information as i could provide and should have precisely described my environment when you asked for that information.
@Joly0 commented on GitHub (Apr 23, 2026):
Hey @Classic298 i just wanted to give you an update on this and some problems i have hit.
So i have tried using the tool you linked to migrate from sqlite to postgres. At first i had some problems because of a bug that appears to be originated by open-webui itself, its described here https://github.com/taylorwilsdon/open-webui-postgres-migration/issues/22
Other than that there were several other errors/warnings while migration, where i am not sure if this is a problem or not.
For example:
So there were several errors, all looking very similar (or are the same). I nthe end however the migration ended with a success (not sure though if it really was one, i have to verify).
But now when i try to start open-webui with
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_OPEN_WEBUI_USER}:${POSTGRES_OPEN_WEBUI_PASSWORD_ENCODED}@postgres:5432/${POSTGRES_OPEN_WEBUI_DB}i get this error on startup of open-webui:
I dont think this is a problem with the migration, but rather with open-webui.
The postgres instance is running with this compose:
Regarding open-webui compose i didnt change anything to my previous compose (except for removing the database_sqlite and database_pool_size variables) other than adding:
@Classic298 commented on GitHub (Apr 23, 2026):
for database URL try "postgresql" also if "postgresql+asyncpg" yields this
@Joly0 commented on GitHub (Apr 23, 2026):
Ok, it appears to be working with
- DATABASE_URL=postgresql://${POSTGRES_OPEN_WEBUI_USER}:${POSTGRES_OPEN_WEBUI_PASSWORD_ENCODED}@postgres:5432/${POSTGRES_OPEN_WEBUI_DB}but not with- DATABASE_URL=postgresql+asyncpg://${POSTGRES_OPEN_WEBUI_USER}:${POSTGRES_OPEN_WEBUI_PASSWORD_ENCODED}@postgres:5432/${POSTGRES_OPEN_WEBUI_DB}@Joly0 commented on GitHub (Apr 23, 2026):
From my user the migration seems to have worked, atleast i cannot seem to see any missing chats, but those errors i posted earlier during migration are still kinda concerning
@Classic298 commented on GitHub (Apr 23, 2026):
Report it to @taylorwilsdon in his repository otherwise he won't see it
@Joly0 commented on GitHub (Apr 23, 2026):
Ok, will do, but shouldnt
postgresql+asyncpgwork accoridng to the open-webui docs?@Classic298 commented on GitHub (Apr 23, 2026):
yes looking into that. thx