Originally Posted By: Shonky
Can you split the library in half and see if one half is good and one is bad?
Funny y9u should ask. I just finished doing that, but rather than split in half I just moved out of the Library all new acquisitions since October because it only started failing sometime in November.

It didn't take long to narrow it down to a single file, and it was not one of the eBook directories or files. It was the metadata.db file.

While Calibre keeps the meetadata in a separate file for each eBook within the directory for that eBook, this information is just backup for the metadata.db master file which is kept in root of the Library directory. The metadata.db file is what is loaded when Calibre starts.

If I start Calibre without the metadata.db file in place, Calibre creates a new, empty metadata.db file and the program loads and starts up very quickly, but of course without showing anything from my eBooks library.

From there, there is an option within Calibre to rebuild/restore the database by going to the metadata files associated with each eBook amd recreating the master metadata.db file.

I have done this. The process takes a couple of hours and failed the first two times I tried it because it aborted when my power-save settings put the computer into sleep mode part way through. Ooops!

The new metadata.db file is now created, and it is about half the size of the old one. Calibre now starts up and runs in the normal three seconds... UNLESS the computer was rebooted since the last time the program was run. Then it delays the startup for about half the time it used to delay, no doubt because the new metadata.db is about half the size of the old one.

There is a ray of hope, albeit a small one. The restore flagged seven of the 4500 books (OK, I exaggerated, there are only 4489 eBooks in the library) as having metadata errors. I can delete these books from the library and see if that changes anything. I am not optimistic. I have the original source material for three of the seven books, and only one of the remaining four books (Larry Niven's "Footfall") is important enough to me to want to re-source.

Time to reboot and see what Calibre does with those seven books now out of the library.

======================================

Edit: Well, that was a surprise. Immediately after a reboot, Calibre loaded and ran in two and a half seconds once the seven books were removed from the library.

I think I can say "Problem solved."

tanstaafl.


Edited by tanstaafl. (25/12/2016 04:08)
Edit Reason: Results of test
_________________________
"There Ain't No Such Thing As A Free Lunch"