Do you ever teriminate threads via TerminateThread() or run as a service (where the scm will call terminateThread() once your main service thread exits)? In other words do you hard-kill your threads?
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Filip Navara Sent: Wednesday, October 14, 2009 7:15 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Corrupted database On Mon, Oct 12, 2009 at 8:56 PM, McClellen, Chris <cmcclel...@weather.com> wrote: > What is your synchronous set to? Full? FYI If you are using .NET data > providers, it is set to "Normal" by default. Normal or Off, but no power failure was involved. (Yes, System.Data.SQLite is used) > If it is not set to full, I have seen corruption when an application > crashes, or exits when a thread is in the middle of updating the db > (Synchronous = OFF makes corruption even easier in this case). I have > seen apps that do not wait for background threads to finish before > termination, and without full sync on, either the db or the log gets > corrupted. A corrupted log can cause problems for you db on next run > when recovery happens. Sounds suspiciously like our case, but still Synchronous=off is supposed to work in the event of application crash, hard killed threads and so on. Previous version of the application frequently forgot to close the databases on exit and did other nasty things that and now fixed, but none of them should cause the database to be corrupted. Best regards, Filip Navara _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users