A number of TV series are suddendly unwatchable and even unremovable?

All of a sudden at least three TV series I’ve had for ages now have issues? I was watching one earlier today, came to watch it again, and it refused to open when I clicked on the series to allow me to resume it.

If I go into the server, there is no art/cover for the three series in question now. If I rescan, nothing changes. Reboot and try again, nothing changes. If I physically remove the series folder and try and tell Plex to delete the series, " There was a problem deleting this item."

If I change a series root folder name and rescan, nothing changes.

So I have them appearing in “TV Shows” with blank covers and cannot even click into them…

If I take the “edit” option, I get, “There was an error editing this item.”

If I go into the Plex client on Windows, an Android phone or LG TV, I get issues with the series too.

What is your server platform?
How full is the hard drive where the Plex data folder is residing?
Did you experience a sudden power outage or hard shutdown of the server machine in the past?

  1. activate debug logging (not ‘verbose’!)
  2. quit Plex Server
  3. wait 1 minute
  4. start Plex Server
  5. wait 5 minutes
  6. 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.

In that log file, there’s lots of both of the issues you mention. eg:-

Jul 29, 2022 14:34:03.052 [3460] ERROR - [Req#2649] SQLITE3:0x64e86ab9, 11, database corruption at line 81887 of [1b256d97b5]

Jul 29, 2022 14:33:57.394 [10964] ERROR - [Req#262a] Got exception from request handler: sqlite3_statement_backend::loadRS: database disk image is malformed

ps: Thanks for the quickest response ever :slight_smile:

Try a repair.

Umm… Excuse my ignorance but where is the option for that?

The orange text above is a link.

So at a DOS prompt I enter:-
“C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe” “C:\Program Files (x86)\Plex\Plex Media Server\Resources\com.plexapp.plugins.library.db”

…and get up the sqlite console “sqlite>”

I then issue:-
PRAGMA integrity_check;

And get:-
Error: unable to open database file

What am I doing wrong? Why isn’t this all automated option in Plex itself? :frowning:

The database file is not located in this folder.
Try
C:\Users\Parents\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db instead

Alternatively (if the cause of the damage is relatively recent), you can try to restore one of the database backups: Restore a Database Backed Up via 'Scheduled Tasks' | Plex Support

sqlite> PRAGMA integrity_check;
*** in database main ***
On tree page 43805 cell 13: Rowid 713126 out of order
On tree page 43796 cell 12: Rowid 712808 out of order
On tree page 43781 cell 14: Rowid 712057 out of order
On tree page 43750 cell 63: invalid page number -1627346181
On tree page 43752 cell 11: Offset 41346 out of range 84…1020
On tree page 43752 cell 7: Rowid 710878 out of order
On tree page 43751 cell 11: Offset 6000 out of range 46…1020
On tree page 43750 cell 41: Offset 57464 out of range 338…1020
On tree page 43750 cell 35: Rowid 710643 out of order
On tree page 43750 cell 23: Rowid 709924 out of order
On tree page 43750 cell 9: Offset 62650 out of range 338…1020
On tree page 43750 cell 3: 2nd reference to page 43710
Error: database disk image is malformed
sqlite> VACUUM;
Error: database disk image is malformed
sqlite> REINDEX;
Error: database disk image is malformed
sqlite>

That might mean the database is unfortunately not salvageable.
Try restoring one of the backups.

In the notes to restore a backup it says to remove/rename:-

com.plexapp.plugins.library.blobs.db
com.plexapp.plugins.library.blobs.db-shm
com.plexapp.plugins.library.blobs.db-wal

I do NOT have those latter two files?

Next it says to:-
“Duplicate the database backup file into the correct directory and then rename them to com.plexapp.plugins.library.db and com.plexapp.plugins.library.blobs.db.”

So I simply:-
copy com.plexapp.plugins.library.blobs.db-2022-07-27 to com.plexapp.plugins.library.blobs.db
and:-
copy com.plexapp.plugins.library.db-2022-07-27 to com.plexapp.plugins.library.db

…and that’s it?

Right seems to be working again…

Many MANY thanks!

Would love to know what caused the corruption because that is worrying!

I urge you to perform the “check” steps on the restored DB again. Just to be on the safe side.

See the second and third sentences of my first response above.

No “corrupt” or “malformed” in the log file (now) :wink:

Continued uber thanks!

1 Like

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