-
Notifications
You must be signed in to change notification settings - Fork 378
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
How to debug "database is locked" errors? #3378
Comments
Thanks for the follow-up! Unfortunately, these errors are not easy to debug since sqlite3 can't tell you which trace has originally obtained the lock. Could you share how you're opening the database? If you're using |
Previously I constructed it using openConnection, now I changed it to driftDatabase() from drift_flutter, but I can't find the option regarding isolates? Here's the diff:
|
The option is nested under the |
Thanks! Oddly that didn't appear in my Android Studio when I wrote the comment... |
Unfortunately my issue was not resolved by asserting only a single isolate accesses the database (see discussion below).
Observed with drift 2.21.0..
Device parameters:
Discussed in #3343
Originally posted by mrclauss November 17, 2024
Hi folks, I do have a sporadic issue resulting in a SQLite "database is locked" error, however I'm not sure how to debug/resolve this. Are there any hints for solving this?
Drift version: "2.19.1+1"
Stacktrace looks like this:
Any help appreciated :)
The text was updated successfully, but these errors were encountered: