Database corruptions

Hi,

I just wanted to post a sort of head's up about the database corruption problems that I have been having. I've been running zotero for over a year now, but around the time I upgraded to the 2.0 beta version I started have repeated and regular database corruption problems. I haven't sustained any significant data loss that I'm aware of, but I keep having to rebuild the db with the db repair tool.

And by repeat, I have a corruption that I have to rebuild about once a week if I'm using it heavily, once a month otherwise. I suppose I don't know if there is some sort of systemic problem with my harddisk, or if the more complex architecture that I'm subjecting zotero to is exposing irregularities. (I'm running three OSs on the same laptop and 'sharing' the zotero.sqlite file on a fourth data partition that is accessible to all three) But I'm not having any other file corruption problems, nor do any other diagnostics indicate larger harddrive or file system problems.

That being said, I am running firefox 3, and from the documentation I wouldn't have expected such repeated problems with corrupting the database. Any ideas on what I should look into to try and curtail this behavior? It's pretty obnoxious when you're in the middle of working on importing a bunch of citations and the db goes down.

Also, mad props to whoever designed the automated backup and saving routines for the db. That's the main reason that I haven't lost any work (yet) during all these corruptions.
  • Well, something is quite wrong in your system configuration, clearly.

    Are you shutting down each OS completely when you switch between them? If not, and you're using hibernation/suspension instead, my best guess is that you're not closing a Zotero-enabled Firefox completely on all systems (including, on Windows, making sure the firefox.exe process isn't still running) before starting it another.
  • I'm only too familiar with the problems of suspending windows, and while I do suspend my xp occassionally, this problem started *before* I enabled hibernation support on the system. In other words, the problem manifested when the computer was not able to be hibernated.

    Now that I think about it, I suspect that the problem lies in running different subversions of 2.0 beta. I didn't get them all installed at the same time, and with each installation of zotero, it told me that it needed to update/rebuild the sqlite file for the new version. This would imply that the different subversions interact with the database differently, and that the update/version check may only run once on installation.

    Hmm...let's check:
    Mac: 2.0b7.4
    XP: 2.0b7.2
    (I'll have to reboot before I can grab the Ubuntu version)

    Well, that theory seems plausible, but I should leave well enough alone with theories about that of which I know little...
  • Now that I think about it, I suspect that the problem lies in running different subversions of 2.0 beta.
    Nope, that's not it. If a database upgrade is necessary, Zotero does it on startup. And Zotero itself can't cause database corruption.

    Are you rebooting into all of the OSes or using virtualization for some of them? If the latter, you wouldn't need to have hibernation enabled to suspend the OS.

    Otherwise, though, I'm not going to be able to help you here beyond suggesting that you make frequent use of the Check Database Integrity button in the Advanced pane of the Zotero prefs and try to discern some pattern in when the corruption occurs.
  • I'm not running any virtual machines, it's a true triple boot machine. I haven't seen any real pattern to the database corruptions. Today I installed the zotero plugin in firefox in OSX (I hadn't gotten around to it until today...), I changed the link that points to the sqlite/zotero directory to my shared file, it said that the library needed to be updated/rebuilt, and then the database corrupted before it finished recognizing/adding the file. Zotero wouldn't even open.

    Two or three weeks ago, I was using zotero in Windows XP, and had been using it all day compiling a bibliography for my work when randomly it reported that the database had been corrupted and had reverted to the last saved version (which did not include my full day's work...but I was able to repair the damaged file and get it back).

    They seem pretty random to me, the only other thing I can think of is that in both of these examples, the corruption happened after a failed sync attempt. The first day, I think it was a network problem (weak wifi signal) where the progress bar hung and clicking on it didn't seem to cancel the sync, but today I have no idea why the sync failed. However, today the fail popped up an error and i clicked on the 'report' button without thinking about it. The problem with that is that I didn't save the log number that it said I needed if I actually wanted any help.

    But then again, if the database is wonky, the sync might fail because the database is wonky...

    Would it do any good to export my library and then reimport it into a new file?
  • There's no reason to think syncing is related, nor is there any reason to export and import. (The DB Repair Tool creates an entirely new database file anyway.)

    This is a file corruption problem, not a Zotero problem, and it's almost certainly a result of something particular to your system setup. As far as we know, there've been no file corruption issues in Firefox since Firefox 2.0.

    Afraid I can't tell you much beyond that, though. You can leave the Advanced pane of the prefs open and click the DB check regularly.
Sign In or Register to comment.