-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/23/2010 08:21 PM, Chad Rebuck wrote:
> I am new to databases so perhaps there is something very basic I am
> overlooking here.

You may inadvertently be causing the busy errors yourself.  Have you
read this:

  http://www.sqlite.org/lockingv3.html

A simple example is if you have a select query in process 1 from which
you read one result at a time, process and continue with the query:

   for row in ("select * from db"):
      ... do work with row ...

This will block writes in the second process since the select is always
live.  Workarounds include using WAL mode, gathering all results from a
select before processing them, and using one thread/process to do the
database work dispatching work items to child threads/processes.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxy3lIACgkQmOOfHg372QTTyACgx4qhZSQ5bMjREOYuZBlOG6fM
UbsAnRZDEYZMRcrKUrDiHpPRKs4mhx10
=Af1h
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to