Murga-Projects Forums
sqlite database is locked - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: sqlite database is locked (/showthread.php?tid=338)


sqlite database is locked - asafp - 08-25-2008 06:51 AM

I've got programs that do simple inserts and updates on a single table. It all works fine if only one program is running at a time. I get the "database is locked" on the nrows iterator over a select statement if I start up a second program. I don't have any transactions, commits, rollbacks. Just working with one record at a time on a single table.

I've googled this, there is a lot written out there, but no clear simple solution that I could find.

Has anyone else encountered this? Is there a way to select a single row without using an iterator?


RE: sqlite database is locked - JohnMurga - 08-25-2008 06:47 PM

Haven't tried this ...

Will put a test together, although sqLite locks are very coarse grained so the message could be true.

I am trying to finish a 0.6.9 right now ...

Cheers
John de Murga


RE: sqlite database is locked - asafp - 08-29-2008 08:44 AM

db:busy_timeout might do the trick. It looks like the default value is zero, meaning it doesn't wait at all if there is a busy condition. I haven't been able to try it yet.