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

Fix 'database is locked' error #656

Closed
wants to merge 1 commit into from

Conversation

cerblue
Copy link
Contributor

@cerblue cerblue commented Jul 20, 2022

Fixes #652

Caused by concurrent access from deal goroutines to a single sqlite3 DB connection. By default, this will cause the 'database is locked' error, and it is the reason for failures in deal status updates and deal log appends. The fix comes from suggestions in https://github.com/mattn/go-sqlite3#:~:text=Error%3A%20database%20is%20locked and mattn/go-sqlite3#209.

I wrote a toy program to reproduce the error and confirmed that this change fixes the error, and does the same to my boost daemon instance.

@cerblue cerblue closed this Jul 20, 2022
@cerblue cerblue deleted the db-error-fix branch July 20, 2022 17:29
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

Successfully merging this pull request may close these issues.

Deals randomly fail with 'failed to persist deal state: database is locked' error after publish
1 participant