Error after updating from PlexMediaServer-1.7.6 to 1.8.0 (and later) on a Synology

I’m running Plex Media Server on a Synology DS412+. It has been running great up to version 1.7.6. When I update my Plex Media server from version 1.7.6 to 1.8.0 (or later) I get several errors, that occur as well on Plex Web as any app (Windows, Android, …)

  • First, when I open Plex, the dashboard won’t load and shows the error: “There was an unexpected error loading the dashboard”.
  • Second, when I select a library (for example movies), the entire list is showed. However, clicking a movie to see the details gives me a simular error: “There was an unexpected error loading this item.”

When I uninstalled version 1.8.0 and re-installed version 1.7.6, I got everything running perfectly again. In the meantime, version 1.8.1 has arrived, but I have the exact same error there.

Browsing through forums, I tried several things, most of them, I expected not to work, but tried them anyway.

  • Repairing the database (which did return OK on the check, but repaired it anyway).
  • Deleting all channels
  • Deleting all “Watch later” items
  • Clearing the cache, as well the “PhotoTranscoder” as the “Plugin-in Supprt\Cache”
  • The Plex Dance (off-course) :slight_smile:
    None of the solutions fixed anything.

Hopefully, someone figured out a solution for this, and if so, would you please be so kind to share this solution.
Thanks in advance



Upgrades do change database schemas in some releases eg 1.8.x and any pre-existing database corruptions would stop the database schema update and may then lead to errors such as dashboard loading error

We can only tell if that was the case if you provide the server logs for the first launch of 1.8.x

See https://support.plex.tv/hc/en-us/articles/201643703-Reporting-issues-with-Plex-Media-Server
https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files

Thank you for your quick response.
Logs after update to 1.8.1-4139 in attachment.
Plex runs on a Synology DS412+

@ferreto1978 said:
Thank you for your quick response.
Logs after update to 1.8.1-4139 in attachment.
Plex runs on a Synology DS412+

It is as i thought - a database corruption that existed already which has stopped the database migration to apply the database schema changes leading to errors when needing some new database columns that were not there because the database migration aborted

The attempt to make the database changes failed due to this

Aug 20, 2017 08:00:39.626 [0x7f4bfb2f9800] ERROR - SQLITE3:0x10, 267, statement aborts at 11: [delete from fts4_tag_titles] database disk image is malformed
Aug 20, 2017 08:00:39.637 [0x7f4bfb2f9800] ERROR - Exception inside transaction (inside=1) (../Library/FullTextSearch.cpp:38): sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 20, 2017 08:00:39.637 [0x7f4bfb2f9800] ERROR - Exception inside transaction (inside=1) (../Library/DatabaseMigrations.cpp:195): sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 20, 2017 08:00:39.668 [0x7f4bfb2f9800] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

Please see steps here for advice on how to try a repair of the database
https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database
Other option Restore Database from a scheduled backup

I already tried the fix database earlier, using that method, but that didn’t work.

Anyway, I tried it again, following these steps

  • Stop Plex server
  • Repair the database, following the instructions in the link provided.
  • Upgrade to v1.8
  • Start Plex server
    However, as I feared, I still have the same issues.
    In attachmant are the newest log files.
    If the logs still show a database corruption, is there any way to fix it besides the method in the link you provided?

@ferreto1978 said:
I already tried the fix database earlier, using that method, but that didn’t work.

Anyway, I tried it again, following these steps

  • Stop Plex server
  • Repair the database, following the instructions in the link provided.
  • Upgrade to v1.8
  • Start Plex server
    However, as I feared, I still have the same issues.
    In attachmant are the newest log files.
    If the logs still show a database corruption, is there any way to fix it besides the method in the link you provided?

It is still the same -

Aug 21, 2017 18:01:13.949 [0x7f9585d90800] ERROR - SQLITE3:0x10, 267, statement aborts at 11: [delete from fts4_tag_titles] database disk image is malformed
Aug 21, 2017 18:01:13.960 [0x7f9585d90800] ERROR - Exception inside transaction (inside=1) (../Library/FullTextSearch.cpp:38): sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 21, 2017 18:01:13.960 [0x7f9585d90800] ERROR - Exception inside transaction (inside=1) (../Library/DatabaseMigrations.cpp:195): sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 21, 2017 18:01:13.990 [0x7f9585d90800] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

If the database repair is not successful i would expect it to give an error duing that sequence rather succeed in dumping the content

Did the database fail the integrity check ? (first step in the instructions)

If you cannot repair a database then the second option is to look for a database backup from scheduled tasks backup and do a restore

I did the integrity check first indeed. Each time I tried that, it said “OK”. (In the forums I read that it doesn’t guarantee that the database is OK.)
Anyway, since the repair didn’t work, I tried the second option, as you suggested, and took a sheduled backup (the earliest I could find), but still the same result. Apparantly, the error has been in there for quite a while.
Isn’t there any other way to repair the database? I know starting over is one, but I’ve spent quite some time scoring and sorting (playlists, collection, watched/unwatched …) my movies and music, so I’m not very fond of starting from zero again.

@ferreto1978 said:
I did the integrity check first indeed. Each time I tried that, it said “OK”. (In the forums I read that it doesn’t guarantee that the database is OK.)
Anyway, since the repair didn’t work, I tried the second option, as you suggested, and took a sheduled backup (the earliest I could find), but still the same result. Apparantly, the error has been in there for quite a while.
Isn’t there any other way to repair the database? I know starting over is one, but I’ve spent quite some time scoring and sorting (playlists, collection, watched/unwatched …) my movies and music, so I’m not very fond of starting from zero again.

Did you actually go through the dump and recreate sequence after the integrity check?
And was the server shut down during this work?

You could send me the file and lest logs and I will have a look
Please keep original filename - to confirm that the right database file was being checked

Yes, I followed each step as described in https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database

So I’m giving it another go and will sum up each step as I"m trying.

  1. Turn off Plex Server v1.7.6(4058)
  2. sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”
    Returns: ok
  3. sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
    I now I have two files:
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db
    -rw-r–r-- 1 root root 71M Aug 26 08:17 dump.sql
  4. mv com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
    Renames the database
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db.original
    -rw-r–r-- 1 root root 71M Aug 26 08:17 dump.sql
  5. sqlite3 com.plexapp.plugins.library.db < dump.sql
    I now should have a repaired database
    -rw-r–r-- 1 root root 76M Aug 26 08:19 com.plexapp.plugins.library.db
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db.original
  6. chown plex.users com.plexapp.plugins.library.db
    Otherwise, Plex won’t be able to access the new file
    -rw-r–r-- 1 plex users 76M Aug 26 08:19 com.plexapp.plugins.library.db
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db.original
  7. Start Plex server (still v1.7.6)
    So far, so good
  8. Upgrading to v1.8.1 using the file “PlexMediaServer-1.8.1.4139-c789b3fbb-x86_64.spk”
  9. Start and open Plex → ERROR (same as I described earlier)

So all I normally do for a fall back is:

  1. Stop and uninstall Plex server (can’t just downgrade on a synology)
  2. Install Plex server v1.7.6 using the file “PlexMediaServer-1.7.6.4058-8fa494d15-x86_64.spk”
  3. Start and open Plex → All looks OK again

At this point I’m collecting the logs and a copy of both databases
Hopefully, this has some valid data.

And thank you for your support and patience :slight_smile:

@ferreto1978 said:
Yes, I followed each step as described in https://support.plex.tv/hc/en-us/articles/201100678-Repair-a-Corrupt-Database

So I’m giving it another go and will sum up each step as I"m trying.

  1. Turn off Plex Server v1.7.6(4058)
  2. sqlite3 com.plexapp.plugins.library.db “PRAGMA integrity_check”
    Returns: ok
  3. sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
    I now I have two files:
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db
    -rw-r–r-- 1 root root 71M Aug 26 08:17 dump.sql
  4. mv com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
    Renames the database
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db.original
    -rw-r–r-- 1 root root 71M Aug 26 08:17 dump.sql
  5. sqlite3 com.plexapp.plugins.library.db < dump.sql
    I now should have a repaired database
    -rw-r–r-- 1 root root 76M Aug 26 08:19 com.plexapp.plugins.library.db
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db.original
  6. chown plex.users com.plexapp.plugins.library.db
    Otherwise, Plex won’t be able to access the new file
    -rw-r–r-- 1 plex users 76M Aug 26 08:19 com.plexapp.plugins.library.db
    -rw-r–r-- 1 plex users 79M Aug 26 08:14 com.plexapp.plugins.library.db.original
  7. Start Plex server (still v1.7.6)
    So far, so good
  8. Upgrading to v1.8.1 using the file “PlexMediaServer-1.8.1.4139-c789b3fbb-x86_64.spk”
  9. Start and open Plex → ERROR (same as I described earlier)

So all I normally do for a fall back is:

  1. Stop and uninstall Plex server (can’t just downgrade on a synology)
  2. Install Plex server v1.7.6 using the file “PlexMediaServer-1.7.6.4058-8fa494d15-x86_64.spk”
  3. Start and open Plex → All looks OK again

At this point I’m collecting the logs and a copy of both databases
Hopefully, this has some valid data.

And thank you for your support and patience :slight_smile:

Thank you

I have recreated the error using a dump.sql from your database. I have referred it to the development team.
I am removing your db from your post

OK. Thank you.
Hopefully, I’m awaiting a solution so I can finally upgrade :slight_smile:

Any news … ?

No - nothing yet and i am not hopeful. The specific problem with the failure to rebuild the virtual table has not been seen elsewhere and it may well be some specific corruption that is impacting the virtual table.

I am waiting to discuss further with the development team to see if there is anything that can be done to recover the database. I will come back Monday / Tuesday if there is any possibility of recovering the database

Thank you for the update.

Is there any new info on the database ?

I tried to get feedback but unfortunately the developer had to go away. End of next week could be

I was trying to find out if there is any way to restore the db from a dump without the virtual tables and see if they get recreated automatically

I had the same problem on QNAP. I spooled up my old unRAID box and am using that again which works fine.

@ChannelZ said:
I had the same problem on QNAP. I spooled up my old unRAID box and am using that again which works fine.

I am not aware of any other virtual table corruption - if it happened to your server, would love to see your database

Any news from the development team on this issue ?

Dear Plex,
This issue that I’m having has been going one for more than a month now.
I believe I have been quite patient so far, but I’d really like to urge you to come up with a solution quickly.
Thank you in advance.