Hi Simon Wanted to chime in to say I was able to in fact cause the database to go corrupt from other external processes trying to write to the database (in WAL mode) while the main app was also using the database. So I have a feeling it's something else. I've tried hard to create a mini-app that demonstrates this but have had no luck; it happens randomly but frequently enough to warrant a red flag,
After 'stress' testing the app launched twice with various threads trying to open and close the connection, I was able to crash the app once but for a very different reason, something about a pointer being misaligned while writing stats to disk. I had enabled this flag earlier and turning it off seems to have helped: #define SQLITE_ENABLE_STAT4 1 I also changed this: #define SQLITE_DEFAULT_WAL_AUTOCHECKPOINT 1000 to 250 A smaller checkpoint seems to have either put a bandaid on the corruption issue or I'm finding it increasingly difficult to corrupt the db. I've tried launching 5 instances of the app while also trying to access and write from the plugins as before - everything goes smoothly. No corruption. Could the two changes I made above have had an impact somehow? Again, I'm unable to reliably corrupt the db but I could sit and repeat the steps 20 times and have it go corrupt at least once before. Now I've been trying for over two hours and it seems to be okay. regards Fahad -- 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