-
-
Notifications
You must be signed in to change notification settings - Fork 738
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
SQLite Error 14 - Loss of ideas :) #1741
Comments
Hello @freak4pc, I don't have much new information about Here are some possible actions for you: First check which operation throws
Please report your findings! |
Thanks you! In regards to corruption and WAL I would expect it to solve itself with the fix that destroys the DB files (folder) entirely and opens a new one - since those are supposed to create the WAL files as well IIRC? I'm wondering if switching to DatabaseQueue could be helpful. I don't think we're directly using anything special from DatabasePool but we've been using it for a while so unsure at this point. Is there any meaningful risk in trying that? Could it help? Thank you :) |
Yes, it does.
I'm just as puzzled as you are, so all bets are off. I wouldn't prevent you from trying, of course. The behavior difference between DatabaseQueue and DatabasePool is that DatabaseQueue serializes all db accesses, when DatabasePool allows parallel reads and writes. For example, imagine your app is performing a slow write transaction in the background (such as saving a lot of remote data to disk). With a pool, the app can fetch and display database values (they'll eventually update, after the write has completed, if the app is observing them). With a queue, the app has to wait until the write transaction has ended before it can fetch and display database values. With a queue, there is a risk that the main thread hangs (if it performs synchronous reads), or that the UI displays more loading screens (if it performs async reads). |
Hey there,
We've been experiencing intermittent SQLIte Error 14 specifically in production (we're unable to reproduce).
I'm aware of it being a general catch-all "Can't open" error, and did see some issues like this one: #1351
Unfortunately I'm unsure how any of these apply to us
I've tried, as a fix, to catch these errors and in those cases entirely remove all local database files and re-create the DB. Doesn't seem to mitigate.
My only suspicion at this point is WAL-mode, but I don't think we're doing anything funky with it. It's mostly like the docs.
I'm wondering if there's any substantial loss of dropping to a DatabaseQueue to see if it solves the problem, or if it can solve the problem at all.
The second option is that our
dbWriter
ends upnil
somehow after the coordination operation, but I'm not sure how that's possible. I will attempt to change the thrown error there to something else to confirm, but don't think it's the culprit.Here's our
openDatabase
:Any ideas will be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: