Fixes for recurring "There was an unexpected error loading this library"?

I got the “There was an unexpected error loading this library” message yesterday on both my TV Shows and Movies libraries. After reading through the forums and FAQ, I tried optimising the databases, but this didn’t work. The media in the home screen was still there (continue watching, recently aired, etc) and worked, but not the overall libraries. As I thought the instructions on repairing the database was beyond me, I just deleted the TV Shows library from the Libraries panel in Plex. After forming a new library, it started to work again, however it is already corrupt again (seems to be confirmed in the logs, but they’re all French to me, that was just from searching “corrupt”). None of the metadata seems to have downloaded.

I am wondering a few things:

  1. Do I need to actually navigate to the database file to delete it, or is deleting the library in Plex sufficient?
  2. I started using Deluge again a few days ago (previously only NZBs since I got that up and running), could a setting there be playing with Plex?
  3. Over a week ago I installed another 6 HDD, 2 of them as new parity disks, however it seemed to run fine for over a week. This shouldn’t be an issue I assume?
  4. Could the missing metadata in the new library be indicative of something?
  5. Is there something else I should be checking that was missed in my research on this?

I have seen comments that this could be an issue with NAS devices. My server is dual Xenon and barely hits double digit usage, I doubt anything in it is maxing out, if that is a consideration.

Server Version#: Version 1.14.1.5488 (running on Unraid)
Player Version#: On Android, Shield, WebPlayer (Version 3.77.4)

Server logs:
https://drive.google.com/file/d/1KQmju1sqr7e-2jqocvXgODc-KKkJdmPQ/view?usp=sharing

Any ideas please? Sorry I am not super good at explaining the issue, I am still learning Unraid/Plex (though it has been over a year now, I still aren’t great at troubleshooting).

The log shows that the Plex Media Server database is corrupt

Feb 05, 2019 20:56:42.580 [0x1545c67fd700] ERROR - SQLITE3:0x10, 11, database corruption at line 72951 of [fc49f556e4]
Feb 05, 2019 20:56:42.580 [0x1545c67fd700] ERROR - SQLITE3:0x10, 11, statement aborts at 16: [select distinct metadata_items.id from metadata_items  left join media_items on media_items.metadata_item_id=metadata_items.id  left join media_parts on media_parts.media_item_id=media
Feb 05, 2019 20:56:42.580 [0x1545c67fd700] ERROR - Soci Exception handled: sqlite3_statement_backend::loadRS: database disk image is malformed

See if it is repairable
Related Support Articles
https://support.plex.tv/articles/201100678-repair-a-corrupt-database/
https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

I was afraid this was the solution, I am struggling to follow the instructions given my limited Unraid knowledge. I will try the Unraid forums and go from there.

Thanks sa2000.

If you are more familiar with other Operating System eg Mac / Windows, it ought to be possible to copy the db file there and do the repair there

The other option was finding the backups that would be in same directory and following steps to restore

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.