"database is locked" on first commit?

Mike <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
I'm having a "database is locked" problem with pysqlite.

My python script creates several threads, and creates a database 
connection in each one. The first query to run that requires a commit 
fails and produces a "database is locked" error. I'm sure no other 
queries/connections/programs/etc are modifying my database file, and 
even if they were, all modifying queries are very simple, and the 
database as a whole contains approximately 10 small records. I set the 
timeout equal to 20 seconds, so once the first execute() runs that 
contains a modifying sql statement, that thread will hang for 20 seconds 
and then produce the error I've mentioned. Subsequent execute()s using 
modifying sql also produce this error.

I searched, but I couldn't find any references to this type of problem 
online (beyond "database is locked" issues that aren't relevant here, I 
don't think).

Anyone have a suggestion or solution?

- Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.