Hi Filip,

> what SQLite version and on what platform are you using? There was a
> bug in SQLite 3.6.13 on Windows where SQLITE_CANTOPEN was incorrectly
> returned during journal check when race condition between two threads
> was hit. Also there could be some other software interfering with the
> journal deletion, which could cause SQLITE_IOERR. Typically
> TortoiseSVN has the habbit of doing this. While there is mechanism in
> SQLite to workaround this, it's far from prefect. Known workaround is
> to use "pragma journal_mode=persist;". If this solves your problems,
> then you most probably hit this bug.

I'm using 3.6.14.2 on Windows (compiled in from the amalgamation). I do
have several processes (2 actually, one is an application and the other
is a service) trying to open the same database file. Whoever opens it
first, gets rights to read/write to it (to do this, I'm using a BEGIN
IMMEDIATE TRANSACTION in a loop). When that program exits, the other has
a chance to take over and carry on. This BEGIN sometimes causes the
errors above.

At the moment, I'm just sleeping and retrying and things seem to be ok,
but I'm not confident that it's the right approach.

I'll try the pragma you mention and see if it happens again.

Thanks!

   Dennis


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

Reply via email to