Re: [pysqlite] Connection deadlock because of file lock
"Edzard Pasma" <[email protected]> Sat, 11 Apr 2009 01:17:29 -0700
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
--- [email protected] wrote: > As for the other item -- when you get the OperationalError/busy do you perform a ROLLBACK to clear out the transaction? Otherwise you may have a whole load of attempted transactions all trying to get to exclusive access. [...] This must be the explanation and rollback is a better (more efficient) solution that close/reopen. But to me it still looks like a work-around for some imperfection and may confirm the popular belief "don't user SQLite when concurrency is involved". This is however a situation of the past that can only occur with the built-in sqlite3 module of Python2.5. Python2.6 includes a fix for this situation (referred as Murphy's lock). The built-in sqlite3 module of Python2.6 by the still has an other issue with regards to locking, the GIL issue, which only appears in concurrency from multiple threads. So that does not interfere here. With the built-in sqlite3 version of Python3 the popular beliefs about SQLite and concurrency, become really outdated. -Edzard Pasma