Re: [sqlite] Occasional SQLITE_BUSY error on database with read-only operations

2009-10-24 Thread Jamie
On Sat, Oct 24, 2009 at 05:55:53PM -0700, Roger Binns wrote: > Hint: How does the SQLite connection you are currently using know that no > other SQLite connection won't be updating the database? The database is only rarely updated. When it is updated, a copy is taken of it, it is then updated

Re: [sqlite] Occasional SQLITE_BUSY error on database with read-only operations

2009-10-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pavel Ivanov wrote: > I believe the problem here can be either in buggy file locking via NFS The issue is two fold. One is that SQLite still does locking operations even if you open read only (which may not be expected by some users but is

Re: [sqlite] Occasional SQLITE_BUSY error on database with read-only operations

2009-10-24 Thread Pavel Ivanov
> Hint: How does the SQLite connection you are currently using know that no > other SQLite connection won't be updating the database? Isn't it a SHARED lock that will ensure that no other connection is updating the database? And isn't SHARED lock should allow another SHARED lock? I believe the

Re: [sqlite] Occasional SQLITE_BUSY error on database with read-only operations

2009-10-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jamie wrote: > Given all this, why am I on rare occasions getting a SQLITE_BUSY > return code when calling sqlite3_prepare_v2() or sqlite3_step() ? Hint: How does the SQLite connection you are currently using know that no other SQLite connection

[sqlite] Occasional SQLITE_BUSY error on database with read-only operations

2009-10-24 Thread Jamie
I am using the C/C++ interface to SQLite version 3.6.17 in a Linux environment. I am using SQLite as part of a CGI program on a clustered group of webservers which do searches on the database. Some of these searches can happen at the same time as multiple instances of the CGI program can execute