[Twisted-Python] adbapi : sqlite3.OperationalError : database is locked
Gabriel Rossetti
gabriel.rossetti at arimaz.com
Mon Jun 22 06:19:54 MDT 2009
Jean-Paul Calderone wrote:
> On Mon, 22 Jun 2009 11:06:24 +0200, Gabriel Rossetti <gabriel.rossetti at arimaz.com> wrote:
>
>> Hello everyone,
>>
>> 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.
>
> Jean-Paul
> A
>
Thank you Jean-Paul, I thought of that just before I saw your msg
(limiting the connection pool to 1 connection), it works great!
Gabriel
More information about the Twisted-Python
mailing list