mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #20067] issue: Concurrent migration execution can cause database schema corruption when using multiple Uvicorn workers #34605
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 @OrenZhang on GitHub (Dec 21, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20067
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.41
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Migrations should be serialized (only one process performs migrations at a time). All workers should wait until migrations complete before continuing.
Actual Behavior
Occasionally, migrations run in parallel, causing DB structure failures (missing columns, errors on schema setup, etc.) as reported by users. This is not always reproducible but is strongly correlated with cases where the DB schema was not updated as expected.
Steps to Reproduce
Logs & Screenshots
sqlite3.OperationalError: duplicate column name: share_id
Additional Information
No response
@owui-terminator[bot] commented on GitHub (Dec 21, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#19864 issue:
by Haervwe • Dec 10, 2025 •
bug#20019 issue:
by j63440490 • Dec 17, 2025 •
bug#19777 issue:
by Yaute7 • Dec 05, 2025 •
bug#20046 issue:
by pierrelouisbescond • Dec 19, 2025 •
bug#19861 issue:
by QuitHub • Dec 10, 2025 •
bugShow 5 more related issues
#19877 issue:
by dotmobo • Dec 11, 2025 •
bug#18366 issue: multiple uvicorn workers do not update / refresh config from database
by mglaubitz • Oct 16, 2025 •
bug#19417 issue: v0.6.37 SQL Error
by AKHYP • Nov 24, 2025 •
bug#19563 issue:
by naruto7g • Nov 28, 2025 •
bug#19211 issue:
by Byrnes9 • Nov 16, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@OrenZhang commented on GitHub (Dec 21, 2025):
Suggestion:
create migrate.py and execute before worker start
@tjbck commented on GitHub (Dec 21, 2025):
@Classic298 our documentation needs to be updated here instead.
@Classic298 commented on GitHub (Dec 21, 2025):
on it