Hello,


I recently decided to make my application use WAL mode since it works with
multiple connections from multiple threads and It should improve
performance.

Since then, I have been having random SQLITE_BUSY_SNAPSHOTS errors (517). I
read the documentation and tried to debug the code but it seems to occur in
a different situation and different thread every time. (I have 10+ threads
who can open a connection at any time).



This is the official doc:

1.      Process A starts a read transaction on the database and does one or
more SELECT statement. Process A keeps the transaction open.
2.      Process B updates the database, changing values previous read by
process A.
3.      Process A now tries to write to the database. But process A's view
of the database content is now obsolete because process B has modified the
database file after process A read from it. Hence process B gets an
SQLITE_BUSY_SNAPSHOT error.

Do you have a recommendation about how to resolve this issue? Is there some
kind of debug mode where I can see exactly which thread is A and which is B?
(the one throwing the error is A, but how can I know who is B?)

Any workaround?



Thanks.

Samuel.

Reply via email to