Re: [sqlite] "database disk image is malformed" error occurs more (AGAIN, damage)

2015-02-03 Thread Mario M. Westphal
Had another damaged database report. This time it is a configuration database which holds application settings. The file is stored on a local disk, not shared, and only ever accessed by my application and only by one thread. The database is run in FULL sync mode for maximum security. I’m

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-31 Thread James K. Lowden
On Fri, 30 Jan 2015 13:17:26 -0500 Stephen Chrzanowski wrote: > 2.1 Filesystems with broken or missing lock implementations > > SQLite depends on the underlying filesystem to do locking as the > documentation says it will. But some filesystems contain bugs in their >

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-31 Thread Mario M. Westphal
As I wrote above, damaged databases are replaced. No user continues working with a damaged database once it has been identified. The issue here is to detect this early and avoid it altogether. > One column of one row of one table may get corrupted. > If that's the case then the database

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-31 Thread Mario M. Westphal
1. No client-server, I use MySQL, SQL-Server or ORACLE for that. 2. No access to the SQLite database ever by more than one process concurrently in writable mode. In readable mode, yes. But the reported damage cases were always single user, one PC. 3. I cannot prevent or disallow users to

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-30 Thread Mario M. Westphal
I estimate that over 90% of the users keep the database on local disks. I can tell from the log files. Keeping the SQLite database it on a network server really hurts performance. That’s not what SQLite is designed for, besides all other aspects of network locking mentioned in various SQLite

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-30 Thread Stephen Chrzanowski
On Fri, Jan 30, 2015 at 8:07 AM, Mario M. Westphal wrote: > > When a user encounters the problem he/she restores the last working > backup. I have a few users who faced this problem more than once. Here I > always assumed some hardware glirch, a shaky USB connection, disk

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-30 Thread Simon Slavin
On 30 Jan 2015, at 1:07pm, Mario M. Westphal wrote: > What worries me more are the incidents where users see this problem happen > several times, with q database kept on a local hard disk or SSD. Just to make it clear, when corruption is reported, the corruption is not

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-30 Thread Mario M. Westphal
> Okay. First, stop doing VACUUM after this. You're not improving things and > you may be making things worse Not important. If this error is encountered the database is marked and the user reminded on every open/close to replace it with a backup. The database is not supposed to be used

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-30 Thread RSmith
On 2015/01/30 14:45, Mario M. Westphal wrote: - The databases in question are stored on a location hard disk or SSD. - If a user stores his database on a NAS box or Windows server, it is accessed directly, via standard Windows file system routines. - From what I can tell, network-based

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-30 Thread Stephan Beal
On Fri, Jan 30, 2015 at 1:45 PM, Mario M. Westphal wrote: > - From what I can tell, network-based databases are not more likely to > corrupt than databases stored on built-in disks or SSDs or databases kept > on disks or USB sticks connected via USB. > That's a big assumption.

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-30 Thread Mario M. Westphal
- The databases in question are stored on a location hard disk or SSD. - If a user stores his database on a NAS box or Windows server, it is accessed directly, via standard Windows file system routines. - From what I can tell, network-based databases are not more likely to corrupt than

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-29 Thread Simon Slavin
On 29 Jan 2015, at 7:04pm, Mario M. Westphal wrote: > The diagnosis log of my application reports the output of integrity_check() > already. > > I retrieved the log from the most recent error report. This is my application > has logged: > > '*** IN DATABASE MAIN *** > ON

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-29 Thread Stephen Chrzanowski
On Thu, Jan 29, 2015 at 2:07 PM, Mario M. Westphal wrote: > Most database damaged errors encountered over time could be pinned to > power failures, disk or *network problems*. > > Network problems? I might have missed a good chunk of this thread, but, this begs to be

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-29 Thread Mario M. Westphal
The core code is in place since about 2008. I took advantage of changes in SQLite over time, from using the shared cache to switching to WAL mode for databases which are not opened in read-only mode. These changes were made between 12 and six months ago, and tested during beta tests and

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-29 Thread Mario M. Westphal
The diagnosis log of my application reports the output of integrity_check() already. I retrieved the log from the most recent error report. This is my application has logged: '*** IN DATABASE MAIN *** ON TREE PAGE 385120 CELL 24: INVALID PAGE NUMBER 151192068 CORRUPTION DETECTED IN

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-29 Thread Mario M. Westphal
My application does not phone home :-/ but I can add output of these functions to the log file my application maintains. My users know how to collect these log files and send them to me. I will also add the error logging callback to my wrapper class and route it to the log file. This

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-28 Thread RSmith
On 2015/01/28 20:06, Mario M. Westphal wrote: 1. I don’t have the damaged databases here so I cannot run the diagnosis myself. The databases are usually too large to upload or transfer. 2. The SQLite version I currently use is 3.8.8.1 (complied using the Amalgation and Visual Studio 2012).

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-28 Thread Richard Hipp
On 1/28/15, Mario M. Westphal wrote: > 1. I don’t have the damaged databases here so I cannot run the diagnosis > myself. The databases are usually too large to upload or transfer. > > 2. The SQLite version I currently use is 3.8.8.1 (complied using the > Amalgation and Visual

Re: [sqlite] "database disk image is malformed" error occurs more

2015-01-28 Thread Mario M. Westphal
1. I don’t have the damaged databases here so I cannot run the diagnosis myself. The databases are usually too large to upload or transfer. 2. The SQLite version I currently use is 3.8.8.1 (complied using the Amalgation and Visual Studio 2012). But since not every user always keeps up to day,

Re: [sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Simon Slavin
On 28 Jan 2015, at 3:15pm, Mario M. Westphal wrote: > The damage is usually detected during “diagnosis” runs. This feature runs an > “analyze” and a” vacuum” command in order to physically validate the database > (and to optimize and compact it). Please don't do that.

Re: [sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Stephan Beal
On Wed, Jan 28, 2015 at 4:19 PM, Richard Hipp wrote: > On 1/28/15, Mario M. Westphal wrote: > > Recently I get an increasing number of error reports about “database disk > > image malformed” errors from my users. These errors show up out of the > blue, > > with

Re: [sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Richard Hipp
On 1/28/15, Mario M. Westphal wrote: > Hello, > > > > I’m using SQLite in one of my applications for several years with great > success. > > The databases managed with SQLite are between 1 and maybe 10 GB, with about > 50 tables or so. > > The platform is Windows 7 or higher. > >

[sqlite] "database disk image is malformed" error occurs more frequently...?

2015-01-28 Thread Mario M. Westphal
Hello, I’m using SQLite in one of my applications for several years with great success. The databases managed with SQLite are between 1 and maybe 10 GB, with about 50 tables or so. The platform is Windows 7 or higher. Recently I get an increasing number of error reports about “database

Re: [sqlite] database disk image is malformed - Error

2012-09-27 Thread David Barrett
In my experience, retrying does often work. -david On Tue, Sep 25, 2012 at 7:31 PM, Rittick Gupta wrote: > Do you think a retry of the query would help resolve this issue ? Do I > have to close & reopen the database. > > Thanks for your help. > > regards, > > Rittick >

Re: [sqlite] database disk image is malformed - Error

2012-09-25 Thread Rittick Gupta
Do you think a retry of the query would help resolve this issue ? Do I have to close & reopen the database. Thanks for your help. regards, Rittick ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] database disk image is malformed - Error

2012-09-25 Thread David Barrett
Yes, still having that problem. We've moved to new servers with SSD's and a ton of RAM, and that seems to have helped matters -- not sure why, though I don't know why it was happening in the first place. (I'm *guessing* the issue is due to two conflicting queries happening at the same time, so if

Re: [sqlite] database disk image is malformed - Error

2012-09-25 Thread Rittick Gupta
David, Thanks. Do you still have the problem ? Did you find a workaround to avoid the problem - appreciate your response. regards, Rittick ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] database disk image is malformed - Error

2012-09-25 Thread David Barrett
You might be interested in this thread: http://www.theusenetarchive.com/usenet-message-sqlite-does-disabling-synchronous-and-shared-cache-cause-%22error-database-disk-image-is-malformed%22-20780199.htm No conclusion was ever obtained, but the discussion was good. -david On Mon, Sep 24, 2012 at

[sqlite] "database disk image is malformed" error but on restart of application everything is fine

2008-06-05 Thread Samuel Neff
We see an error "database disk image is malformed" in our logs sometimes and if we restart our application then it can continue fine--the db is not corrupt. We can open the db in sqlite3.exe CLI and running "PRAGMA integrity_check;" returns OK. What can cause this error if the db is (thankfully)