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