Synology and Plex unexpected error

Database Corruption.

From Plex Media Server.2.log:

Dec 03, 2022 05:54:41.131 [0x7fe473dd00d0] ERROR - SQLITE3:0x80000001, 11, database corruption at line 88814 of [1b256d97b5]
Dec 03, 2022 05:54:41.132 [0x7fe473dd00d0] ERROR - SQLITE3:0x80000001, 11, statement aborts at 3335: [ANALYZE] database disk image is malformed
Dec 03, 2022 05:54:41.149 [0x7fe473dd00d0] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

You’ve three options:

  1. Repair the database
  2. Restore from a backup
  3. Delete it and start over (recreate all libraries)

Repair

Use PlexDBRepair Utility. It is easier than performing the steps manually: Repair a Corrupt Database.


Restore from Backup

See Synology FAQ 31 - DSM 7 - Database Repair using a Backup copy.

Depending on when the corruption occurred, the backups might also be corrupt. You will need to check the log files after restoring from a backup.


Delete and Start Over

If the database cannot be repaired or restored from a backup, you will need to delete it and start over. You will have to re-create your libraries, reshare them with friends/family, etc. Your media files are not touched.

  1. Stop Plex Media Server
  2. In File Station, navigate to the database folder
    /PlexMediaServer/AppData/Plex Media Server/Plug-in Support/Databases
  3. Delete all files in the Databases folder.
  4. Restart Plex Media Server.

You can then login to PMS and re-create your libraries, http://192.168.1.14:32400/web.