I had my collections all set up with all my movies. Suddenly, for no apparent reason – we were literally in the middle of watching a movie – all the movies disappeared out of all the collections. The collections all still exist but every movie is now free of every collection and all the collections have “0 movies”. WTH???
It is even worse than I thought. For some reason, the collections are showing (with 0 movies) but, when I try to tag movies to be part of the existing collections, it seems to think I’m adding a new Collection and doesn’t know the existing ones exist. Thankfully, as long as I type the name exactly the same and choose “Add new [Collection Name]” it actually adds it to the existing collection. What a buggy mess. I’m regretting my choice to buy a Plex Pass.
restart your Plex Server.
then check your server logs for indications of database corruption.
- activate debug logging (not ‘verbose’!)
- quit Plex Server
- wait 1 minute
- start Plex Server
- wait 5 minutes
- fetch log files and attach them here
Or inspect them yourself. Take a look at the Plex Media Server.log
file and seek for messages about database corrupt
or malformed
.
If you find these, you may have to repair your database.
https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database
I do indeed appear to have corruption as per the log file.
May 07, 2018 12:19:16.274 [6536] ERROR - SQLITE3:0x7ffbbf40, 11, database corruption at line 59437 of [fc49f556e4]
May 07, 2018 12:19:16.274 [6536] ERROR - SQLITE3:0x7ffbbf40, 11, database corruption at line 59479 of [fc49f556e4]
May 07, 2018 12:19:16.275 [6536] ERROR - SQLITE3:0x7ffbbf40, 11, statement aborts at 4: [SELECT rowid,* FROM gnsdk_correlates_manifests_table WHERE "ref.1" = ?;] database disk image is malformed
May 07, 2018 12:19:16.277 [6536] ERROR - SQLITE3:0x7ffbbf40, 11, database corruption at line 59437 of [fc49f556e4]
May 07, 2018 12:19:16.277 [6536] ERROR - SQLITE3:0x7ffbbf40, 11, database corruption at line 59479 of [fc49f556e4]
May 07, 2018 12:19:16.277 [6536] ERROR - SQLITE3:0x7ffbbf40, 11, statement aborts at 13: [DROP TABLE IF EXISTS ldata_2_wc1;] database disk image is malformed
However, when I try running the integrity check as described on the repair page you provided, it comes back almost immediately as:
#>sqlite3 com.plexapp.plugins.library.db "PRAGMA integrity_check"
ok
I ran through the “repair” process as described. The steps “worked” and reproduced a database. However, the same corruption messages are still appearing after a fresh start of Plex:
May 07, 2018 13:01:27.560 [2000] ERROR - SQLITE3:0x87be7a03, 11, database corruption at line 59437 of [fc49f556e4]
May 07, 2018 13:01:27.560 [2000] ERROR - SQLITE3:0x87be7a03, 11, database corruption at line 59479 of [fc49f556e4]
May 07, 2018 13:01:27.560 [2000] ERROR - SQLITE3:0x87be7a03, 11, statement aborts at 4: [SELECT rowid,* FROM gnsdk_correlates_manifests_table WHERE "ref.1" = ?;] database disk image is malformed
May 07, 2018 13:01:27.562 [2000] ERROR - SQLITE3:0x87be7a03, 11, database corruption at line 59437 of [fc49f556e4]
May 07, 2018 13:01:27.562 [2000] ERROR - SQLITE3:0x87be7a03, 11, database corruption at line 59479 of [fc49f556e4]
May 07, 2018 13:01:27.562 [2000] ERROR - SQLITE3:0x87be7a03, 11, statement aborts at 13: [DROP TABLE IF EXISTS ldata_2_wc1;] database disk image is malformed
This appears to be related to Gracenote data. Is this a different database that could be corrupted?
@robross0606 said:
This appears to be related to Gracenote data. Is this a different database that could be corrupted?
You assume correctly.
This error message tells you that the damage is not in the main Plex database, but in an different database which is used for storing Gracenote data (used within a Plex Premium Music library).
Shut down Plex server.
locate the Plex data folder
go into the subfolder Cache
in there, are (among others) 4 files with names gn_*.gdb
Erase them.
This will temporarily delete any Gracenote data.
Your server will automatically re-fill them upon next start.
It will take quite some time. You may have to wait a few hours until you can use some of the Premium Music features again.
If after a few days you still cannot use ‘Moods’ or ‘Plex Mix’, you may have to ‘Refresh Metadata’ on your premium music library.
@OttoKerner said:
in there, are (among others) 4 files with namesgn_*.gdb
I only found a single file matching that description in the cache directory: gn_lists.gdb
. While I’m running Plex, I see a gn_lists.gdb-journal file appear and disappear periodically. I assume this is a natural side effect of database journaling. However, I don’t see four files matching that naming pattern.
@robross0606 said:
I only found a single file matching that description in the cache directory:gn_lists.gdb
Then erase it.
I did erase it and that did eliminate that particular corruption message in the logs. However, I’m wondering what (if anything) that would have to do with my video files and collections resetting themselves. It happened again a few days ago.
@robross0606 said:
I did erase it and that did eliminate that particular corruption message in the logs. However, I’m wondering what (if anything) that would have to do with my video files and collections resetting themselves. It happened again a few days ago.
In theory, nothing.
Did you perhaps move your plex data folder to a different location?
If so, I hope it is not on a network share.
It also helps to avoid trouble when you instruct your anti virus software not to interfere in the Plex data folder.
I have not moved my data folder in at least two years. It has been housed on the same drive and location for a long time. I did take everything off line and run a disk scan when this happened just to be sure, but no issues cropped up.
I am using the built-in Windows 10 Defender right now. When you say “data folder” are you referring to the location of my actual media files or the location under AppData
where Plex stores data?
I mean the AppData
location.
(It also reduces hard disk activity immensely if you do the same with the media folder into which your Plex DVR puts the recordings - but that is just a side remark)