On 9/10/15, Doug Nebeker <admin at poweradmin.com> wrote: > I'm hoping this might be of help to contribute to SQLite's robustness. > > We've got thousands of SQLite installations and they almost always work > flawlessly. Every once in a while we get a corruption error and I finally > have a log that catches it. > > SQLite has been in use in the project since version 3.0.3, so 10 years? > Over the years we've poured over: > https://www.sqlite.org/howtocorrupt.html > > The environment is Windows Server 2012 R2, with the database on a local NTFS > drive. > > The process had been running, and the database in constant use, for at least > 90 minutes when the problem occurred. The error callback from > sqlite3_config(SQLITE_CONFIG_LOG) reports: > > (11) database corruption at line 67560 of [2ef4f3a5b1]
All this shows is that the database file is already corrupt, unfortunately. And the "PRAGMA integrity_check" below already shows that clearly and in more detail. So, sadly, this is no help in tracking down the cause of the problem. > > There were no previous database errors that my logging captured. > > I have the database and can provide it if it helps. I'm pretty sure this is > with SQLite 3.8.10.2. > > Database usage: > 1. Only one thread at a time is ever using a connection handle, though there > are multiple threads and multiple database handles (each thread has it's > own). Only one process accesses the database file. > 2. Not using shared cache > 3. Not using WAL > 4. PRAGMA synchronous=1 > 5. PRAGMA temp_store=1 > 6. The database files might possibly be read by an external > backup/anti-virus app, but nothing was written to, and journals shouldn't be > getting deleted > 7. Server was not rebooted/crash/lost power > > sqlite> pragma integrity_check; > *** in database main *** > Page 145387: Rowid 30174458 out of order (max larger than parent max of 0) > Page 137945: Rowid 29568549 out of order (max larger than parent max of 0) > row 14154506 missing from index Ind_StatData_Date > row 14154507 missing from index Ind_StatData_Date > row 14154508 missing from index Ind_StatData_Date > row 14154509 missing from index Ind_StatData_Date > row 14154510 missing from index Ind_StatData_Date > row 14154511 missing from index Ind_StatData_Date > row 14154512 missing from index Ind_StatData_Date > row 14154513 missing from index Ind_StatData_Date > row 14154514 missing from index Ind_StatData_Date > row 14154515 missing from index Ind_StatData_Date > row 14154516 missing from index Ind_StatData_Date > row 14154517 missing from index Ind_StatData_Date > row 14154518 missing from index Ind_StatData_Date > row 14154519 missing from index Ind_StatData_Date > row 14154520 missing from index Ind_StatData_Date > row 14154521 missing from index Ind_StatData_Date > row 14154522 missing from index Ind_StatData_Date > row 14154523 missing from index Ind_StatData_Date > row 14154524 missing from index Ind_StatData_Date > row 14154525 missing from index Ind_StatData_Date > row 14154526 missing from index Ind_StatData_Date > row 14154527 missing from index Ind_StatData_Date > row 14154528 missing from index Ind_StatData_Date > row 14154529 missing from index Ind_StatData_Date > row 14154530 missing from index Ind_StatData_Date > row 14154531 missing from index Ind_StatData_Date > row 14154532 missing from index Ind_StatData_Date > row 14154533 missing from index Ind_StatData_Date > row 14154534 missing from index Ind_StatData_Date > row 14154535 missing from index Ind_StatData_Date > row 14154536 missing from index Ind_StatData_Date > row 14154537 missing from index Ind_StatData_Date > row 14154538 missing from index Ind_StatData_Date > row 14154539 missing from index Ind_StatData_Date > row 14154540 missing from index Ind_StatData_Date > row 14154541 missing from index Ind_StatData_Date > row 14154542 missing from index Ind_StatData_Date > row 14154543 missing from index Ind_StatData_Date > row 14154544 missing from index Ind_StatData_Date > row 14154545 missing from index Ind_StatData_Date > row 14154546 missing from index Ind_StatData_Date > row 14154547 missing from index Ind_StatData_Date > row 14154548 missing from index Ind_StatData_Date > row 14154549 missing from index Ind_StatData_Date > row 14154550 missing from index Ind_StatData_Date > row 14154551 missing from index Ind_StatData_Date > row 14154552 missing from index Ind_StatData_Date > row 14154553 missing from index Ind_StatData_Date > row 14154554 missing from index Ind_StatData_Date > row 14154555 missing from index Ind_StatData_Date > row 14154556 missing from index Ind_StatData_Date > row 14154557 missing from index Ind_StatData_Date > row 14154558 missing from index Ind_StatData_Date > row 14154559 missing from index Ind_StatData_Date > row 14154560 missing from index Ind_StatData_Date > row 14154561 missing from index Ind_StatData_Date > row 14154562 missing from index Ind_StatData_Date > row 14154563 missing from index Ind_StatData_Date > row 14154564 missing from index Ind_StatData_Date > row 14154565 missing from index Ind_StatData_Date > row 14154566 missing from index Ind_StatData_Date > row 14154567 missing from index Ind_StatData_Date > row 14154568 missing from index Ind_StatData_Date > row 14154569 missing from index Ind_StatData_Date > row 14154570 missing from index Ind_StatData_Date > row 14154571 missing from index Ind_StatData_Date > row 14154572 missing from index Ind_StatData_Date > row 14154573 missing from index Ind_StatData_Date > row 14154574 missing from index Ind_StatData_Date > row 14154575 missing from index Ind_StatData_Date > row 14154576 missing from index Ind_StatData_Date > row 14154577 missing from index Ind_StatData_Date > row 14154578 missing from index Ind_StatData_Date > row 14154579 missing from index Ind_StatData_Date > row 14154580 missing from index Ind_StatData_Date > row 14154581 missing from index Ind_StatData_Date > row 14154582 missing from index Ind_StatData_Date > row 14154583 missing from index Ind_StatData_Date > row 14154584 missing from index Ind_StatData_Date > row 14154585 missing from index Ind_StatData_Date > row 14154586 missing from index Ind_StatData_Date > row 14154587 missing from index Ind_StatData_Date > row 14154588 missing from index Ind_StatData_Date > row 14154589 missing from index Ind_StatData_Date > row 14154590 missing from index Ind_StatData_Date > row 14154591 missing from index Ind_StatData_Date > row 14154592 missing from index Ind_StatData_Date > row 14154593 missing from index Ind_StatData_Date > row 14154594 missing from index Ind_StatData_Date > row 14154595 missing from index Ind_StatData_Date > row 14154596 missing from index Ind_StatData_Date > row 14154597 missing from index Ind_StatData_Date > row 14154598 missing from index Ind_StatData_Date > row 14154599 missing from index Ind_StatData_Date > row 14154600 missing from index Ind_StatData_Date > row 14154601 missing from index Ind_StatData_Date > row 14154602 missing from index Ind_StatData_Date > row 14154603 missing from index Ind_StatData_Date > sqlite> > > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp drh at sqlite.org