[sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode

2015-06-01 Thread Simon Slavin
On 1 Jun 2015, at 7:05am, Dan Kennedy wrote: > On 05/31/2015 04:11 AM, Simon Slavin wrote: >> On 30 May 2015, at 9:59pm, Samuel Tebeka wrote: >> >>> I'm doing a BEGIN EXCLUSIVE before every write statement already, should I >>> do it for read steatements as well? >> It's worth a try. I'm not

[sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode

2015-06-01 Thread Dan Kennedy
On 05/31/2015 04:11 AM, Simon Slavin wrote: > On 30 May 2015, at 9:59pm, Samuel Tebeka wrote: > >> I'm doing a BEGIN EXCLUSIVE before every write statement already, should I >> do it for read steatements as well? > It's worth a try. I'm not sure what's wrong here, I'm just hoping we find a > way

[sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode

2015-05-30 Thread Samuel Tebeka
ay 30, 2015 11:57 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode On 30 May 2015, at 9:41pm, Samuel Tebeka wrote: > This is the official doc: > > 1.Process A starts a read transaction on the database and does one or

[sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode

2015-05-30 Thread Samuel Tebeka
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 s

[sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode

2015-05-30 Thread Simon Slavin
On 30 May 2015, at 9:59pm, Samuel Tebeka wrote: > I'm doing a BEGIN EXCLUSIVE before every write statement already, should I > do it for read steatements as well? It's worth a try. I'm not sure what's wrong here, I'm just hoping we find a way to change what's happening enough to figure out a

[sqlite] Statistical SQLITE_BUSY_SNAPSHOT in WAL mode

2015-05-30 Thread Simon Slavin
On 30 May 2015, at 9:41pm, Samuel Tebeka wrote: > 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 > pro