On Sat, Apr 1, 2017 at 6:42 PM, Simon Slavin <slav...@bigfraud.org> wrote:
> > On 2 Apr 2017, at 2:16am, J Decker <d3c...@gmail.com> wrote: > > > there's no corruption. > > There was corruption. The message you reported: > > > Sqlite3 Err: (283) recovered 6942 frames from WAL file > > is exactly a message reporting that the database was corrupt. This > corruption appears, in this case, to be the result of the database not > having been closed correctly. > > Sorry to argue that; the integrity check was Ok and that's what I was basing my statement on. > > Under kill -9 or TerminateProcess (taskmgr, end process) , the > application > > has no chance to do anything, it's not that the application is doing > > something incorrectly. > > Are you routinely using "kill -9" to terminate that application ? In > other words, is that what the application should expect, rather than > receiving a "term" message ? > > No I don't expect that; yes in this app because it's ending up with an abort and signal handlers aren't catching it either... and noticed it causes an anomaly in sqlite; so I thought I would report it. I'm glad there is a workaround; I could even just on getting the 283 message setup to later commit the commited transactions. (probably shouldn't do it in the warning message handler?) Though it does end up doing a little bit of nothing that causes a lot of to do about nothing progressively even... > If so, the application should have the SQLite database open only while > it’s being accessed. That’s the best way, though not perfect, to ensure > that this problem does not happen again. > > > but the operations happen in the first 120ms of the program and never > > later, so if the program runs for more than 1 second sqlite is stable and > > has 0 active statements. > > SQLite depends on having its database closed correctly using > sqlite3_close(). If that’s not happening, you may experience more problems > like the one you reported. > > having this stressed as 'must implement close in order to actually commit transactions(?)' [I don't know; that's what it is to me] but anyway; I can add an idle sweep to close connections when nothing has been in progress for a while.... but only on sqlite connections which complicates things... > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users