-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: external db reconnect #3221
feat: external db reconnect #3221
Conversation
Not needed because of this: #3228. It's already in development. |
As of the last time I tested it, that earlier PR did not work properly if you were using the default SQLite database. I'll test this one later today when I have time to see if it addresses that issue. |
@justinh-rahb, the issue that @RobinBially just excellently delivered as a comment, was opened ~5 hours ago (#3228). I believe you might be mistaking it for #2666. |
You're correct. I blame insufficient supply of caffeine |
It's all good! I'm just hoping one of these 3 PRs pan out for open-webui. Good luck caffeinating further :) |
Should be good to go now, verified it locally for both Postgres and SQLite. Tried on both completely new databases, and previously existing ones. Waited 15 minutes between new queries, repeated 3x times. Seems like it's finally working 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to break it.
Running with postgres database, I can now restart postgres and it no long requires to restart open-webui.
Running with SQLite localfile I can remove the database, It will attempt to create a new one, but if i replace it with the original it continues as expected.
Running with SQLite over a network connection i can break the connection and open-webui work once restored.
That's great to hear! 💪 |
hell yeah brother |
let's gooooo |
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
dev
branch.Changelog Entry
Description
This builds off of #2666 that refused to cooperate with SQLite. Now the backend should automatically attempt to reconnect with the SQLite or Postgres DBs if the connection is dropped.