[Twisted-Python] adbapi : sqlite3.OperationalError : database is locked
exarkun at divmod.com
Mon Jun 22 07:49:24 EDT 2009
On Mon, 22 Jun 2009 11:06:24 +0200, Gabriel Rossetti <gabriel.rossetti at arimaz.com> wrote:
>I am using twisted.enterprise.adbapi with sqlite3 database adapter and
>"runInteraction()". I keep on getting "sqlite3.OperationalError :
>database is locked" errors. I understand the problem, multiple threads
>try to access the DB and it being already locked by a thread it raises
>this exception. My question is what is the standard/correct Twisted way
>of dealing with this?
You can set your connection pool to a maximum of 1 connection. Or you
can try raising the timeout on your database.
More information about the Twisted-Python