One of the other threads is writing at the same time.  SQLite only allows a
single writer at a time to a single database file.  Others have to wait in
line.

Your solution is that when you get an SQLITE_BUSY, delay for a short while
and then try again.  Keep trying until you break through.

Note what I do when the application detects that the database is locked:

SQL Error: SQLITE_BUSY[5]: database is locked
0x10d4f8    waiting 1 sec <-------------------------
0x10d4f8    begin immediate transaction
SQL Error: SQLITE_BUSY[5]: database is locked

This loop continue even when all other threads are done writing and waiting in an idle state.

/Daniel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to