Wempa, Kristofer (Kris), ALABS wrote:
> I'm new to this list and I didn't see this question answered in the places I
> looked.  We have a system that uses a handful of commands to read and write
> to an SQLITE database.  We already control the commands so that only 1 thread
> in one process writes to the database file at any point in time.  However,
> there may be multiple READS attempting to access the same database.  My
> question is this.  Can I simply change the SQLITE code so that the fcntl()
> call for a read lock does a BLOCKING wait instead of a non-blocking wait ?  I
> don't care if the commands take longer to run, but I just don't want to cause
> a deadlock.  Has anybody tried this ?  What about changing the fcntl() for
> both reads and writes to a BLOCKING wait ?  Any help would be appreciated.
> We are currently getting too many "busy" failures when reads are attempted.
>

Using the sqlite_busy_handler() or sqlite_busy_timeout() APIs might be
safer, since they can be rigged to fail if the lock is held for too long.

You can try switching to blocking locks if you want and see what happens.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to