On 9 Jul 2015, at 1:39pm, Constantine Yannakopoulos <alfasud.ti at gmail.com> 
wrote:

> On Thu, Jul 9, 2015 at 2:47 PM, Simon Slavin <slavins at bigfraud.org> wrote:
> 
>> Temporarily turn off shared cache mode, and use a separate connection for
>> each thread.  See if your SQLITE_BUSY reports go away.
> 
> ?Thanks. It seems that the problem goes away if I turn shared cache mode
> off.?
> 
> Does this means that shard cache and busy_timeout() are incompatible?
> Wasn't aware of such a thing.

I'm glad it helped diagnose your problem but I can't answer your question 
because I don't understand what kind of locking shared cache mode needs.  My 
guess is that sharing a cache means sharing the connection.  In other words, 
there's no way to make sure that both threads don't try to use the connection 
at once.  Have you read section 2.0 of

<https://www.sqlite.org/sharedcache.html>

?  Does it help explain why shared cache is causing your problem ?

Simon.

Reply via email to