Hi,

 

I have a situation where I always run into an SQLITE_BUSY error. It's quite
involved, here's the high picture:

 

-3 processes (A, B and C) each have a connection to the same db. Everybody
has a busy handler set for 5 seconds.

 

-1 of these processes (A) opens more than one connection, as it loads a DLL
that opens its own connection.

 

-A needs to check for data at regular intervals, so every second it does a
begin transaction, read then commit transaction.

 

-C deletes data within a transaction. Then it triggers about 400
transactions in B (it basically sends data to B via a TCP/IP layer, B
receives the data and writes in the DB).

 

-A then sees that data has arrived, and does its own processing, eventually
recording some more data (always within a begin/write/commit).

 

-After A is done, it goes back into its "check for data" at the same regular
interval.

 

So far so good. I see the A's begin/read/commit succeed.

 

As soon as I trigger another transaction in C (any transaction), A gets the
SQLITE_BUSY error, even though the transaction goes through normally in C
(i.e. begin transaction, write, commit transaction).

 

Any ideas as to what's wrong in the above scenario? How do I avoid the
SQLITE_BUSY error? Is it possible to recover from that error? (Apparently
not. I close the B and C processes (proper shutdown) and A still gets the
error).

 

Thanks,

 

Normand

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to