Plex Media Server Fails to Run after DSM update

I installed the latest version of DSM (DSM 6.2.2-24922 Update 4) for my DS1618+ and after installation Plex Media Server will not start. I tried updating to the latest version of Plex Media Server for Synology (1.18.3.2156-349e9837e the Intel 64bit version) but that didn’t fix the problem. I tried uninstalling Plex and rebotting the server both multiple times and can’t get Plex to work. any help would be appreciated. I didn’t stop Plex while doing to DSM update and I’ve read that may have caused the issue. I also double checked all my media folders and the Plex user has read/write permissions.

Please manually access and download the logs.

FAQ #1

Logs.zip (1.9 MB)

Thanks. The database is corrupt.

Dec 27, 2019 16:41:37.661 [0x7f0e6269e740] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Dec 27, 2019 16:41:37.661 [0x7f0e6269e740] ERROR - SQLITE3:(nil), 11, statement aborts at 13: [select metadata_items.id, metadata_items.extra_data, metadata_items.parent_id, parents.parent_id from metadata_items join metadata_items as parents on parents.id = metadata_items.paren
Dec 27, 2019 16:41:37.662 [0x7f0e6269e740] ERROR - Exception inside transaction (inside=1) (../Library/DatabaseMigrations.cpp:209): sqlite3_statement_backend::loadRS: database disk image is malformed
Dec 27, 2019 16:41:37.665 [0x7f0e6269e740] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadRS: database disk image is malformed
Dec 27, 2019 16:41:37.752 [0x7f0e6269e740] ERROR - SQLITE3:(nil), 11, database corruption at line 64757 of [bf8c1b2b7a]
Dec 27, 2019 16:41:37.752 [0x7f0e6269e740] ERROR - SQLITE3:(nil), 11, database corruption at line 64798 of [bf8c1b2b7a]
Dec 27, 2019 16:41:37.752 [0x7f0e6269e740] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select max(max(metadata_items.changed_at),max(metadata_items.resources_changed_at)) from metadata_items] database disk image is malformed
Dec 27, 2019 16:41:37.752 [0x7f0e6269e740] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database disk image is malformed
Dec 27, 2019 16:41:37.752 [0x7f0e6269e740] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10soci_errorE)

The database is in Plex/Library/Application Support/Plug-in Support/Databases

Hey Chuck, thanks for the prompt replies! I’m not super familiar with working in a terminal session to fix a Synology NAS. I tried using PowerShell and the Linux instructions from the “Repair a Corrupt Database” link that you sent me but I don’t understand what to do with the SQLlite software so I skipped it and just tried connecting and running the first command “cd $PLEX_HOME/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/” but it could not find the directory.

Are there better instructions specifically written for Synology?

Hey Chuck, I did some more digging and testing and managed to fix the problem using the directions you provided. I had to manually navigate to the Plex database folder and once in there I was able to run the commands and Plex appears to be working again. Thanks for all the help, you saved the day!

Going forward how can I prevent the database from getting corrupted? If I do a DSM update do I have to first stop Plex?

Just now got home. I was away for the day.

In the future, make certain to stop PMS before doing anything DSM related.
The package install shuts down PMS gracefully but DSM does not. it does a hard KILL.

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