I can't be certain now but I think this thread is related:

http://sqlite.1065341.n5.nabble.com/Re-Database-corruption-and-PRAGMA-fullfsync-on-macOS-td95366.html

It was this thread that I landed on earlier this year to presumably fix the
issues I was experiencing personally. This did help, in fact it did cut down
on the reports (I was literally getting 3 reports a day at one time and had
to act quickly). As I explained, using rather primitive locking mechanism,
I'm able to 'serialize' access between threads and this has greatly helped
but am still seeing 'disk I/O' errors and these don't go away till the
process is killed and restarted.

Given WAL relies on the -shm memory mapped file, I think deep down somewhere
there's more to memory mapping and Mac OS than meets the eye. Given two
processes in my case are writing to the same database (both opening it in
WAL journal mode), I suspect somewhere down the line these go out of sync do
to the full sync flushing issues mentioned in the thread above.

I would love to continue using WAL but am now full of doubts. I'm going to
try and switch to DELETE journal mode on the Mac exclusively (as I
mentioned, the exact same code is shared between our iOS and Mac app - not
an atom's worth of difference between the two, and iOS has never troubled
me). 



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to