Skip to content
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

If database is locked, syncing stops #11

Open
justinmoon opened this issue Apr 18, 2024 · 1 comment
Open

If database is locked, syncing stops #11

justinmoon opened this issue Apr 18, 2024 · 1 comment

Comments

@justinmoon
Copy link
Contributor

If an error like this is encountered, it will stop syncing:

2024-04-18T19:42:18.641647Z ERROR task{name="Observer for <federation-id>"}: fedimint_observer::federation::observer: Observer errored: error returned from database: (code: 5) database is locked
@douglaz
Copy link

douglaz commented Apr 19, 2024

It was a long time since I've used sqlx with sqlite, but as far as I know if you have multiple writers to sqlite then it's highly likely that you'll get this error. See for instance: launchbadge/sqlx#451

You can try to limit the pool connections to 1 or use a single connection inside a RwLock. Of course this only makes sense for sqlite because any other database will be able to have concurrent writers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants