Re: [sqlite] sqlite3_busy_timeout not avoiding "database is locked" errors with multi-threaded updates

2005-01-09 Thread Paul Dixon
Stephen C. Gilardi wrote: Of course I could implement this in the application code, but I'd rather understand why sqlite isn't able to do this first. The sqlite source is unfamiliar territory, but I'll have a poke around and try to trace how the busy callback is used. Based on following the dis

Re: [sqlite] sqlite3_busy_timeout not avoiding "database is locked" errors with multi-threaded updates

2005-01-07 Thread Stephen C. Gilardi
Of course I could implement this in the application code, but I'd rather understand why sqlite isn't able to do this first. The sqlite source is unfamiliar territory, but I'll have a poke around and try to trace how the busy callback is used. Based on following the discussions on the mailing lis

Re: [sqlite] sqlite3_busy_timeout not avoiding "database is locked" errors with multi-threaded updates

2005-01-07 Thread Paul Dixon
I'm having some problems with multi-threaded updates failing... (snip)...the best place to start from to get your program up and running is to wrap your updates inside "BEGIN IMMEDIATE" or "BEGIN EXCLUSIVE" transaction blocks(snip) Many thanks for your detailed reply. I tried BEGIN IMMEDIATE

Re: [sqlite] sqlite3_busy_timeout not avoiding "database is locked" errors with multi-threaded updates

2005-01-07 Thread Eli Burke
Paul Dixon wrote: I'm having some problems with multi-threaded updates failing. Multiple threads open their own sqlite connection with sqlite3_open() and then call sqlite3_busy_timeout(handle, 3) to give a 30 second timeout. These threads then perform some inserts on the same table, but I get "