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

I do not have any feedback that it indicates this is recoverable.

It is seen as an sqlite3 database corruption and if the normal methods of recovery of dump sql and recreate is not working and there is no good backup to restore from, then there is not much that can be done.

I can ask one last time on Monday and try and get a final answer from development

@ferreto1978

There may be some good news for you. In my tests the corruption went away !

So shutdown Plex Media Server

Save copy of the database

Then go through the following steps

The usual dump and re-create steps

sqlite3   com.plexapp.plugins.library.db   .dump   >   dump.sql

sqlite3   com.plexapp.plugins.library.db   <   dump.sql

Then the following in command line window

  • Open the database in sqlite3.exe
sqlite3 com.plexapp.plugins.library.db

and then enter these sqlite3 commands

drop table if exists fts4_tag_titles;
CREATE VIRTUAL TABLE fts4_tag_titles USING fts4(content='tags', tag);
.quit

Then launch Plex Media Server 1.9.1

OH MY GOD. That worked !!!
I’m running v1.9.2 and everything works fine!
All the info (date added, watched status, … ) is there, and the dashboard works as well.
Thank you so, so very much !!! :slight_smile:

Brilliant - so worth the wait !

It is good to know that corrupt virtual tables can be recreated.

I agree.
Lets hope it keeps running smoothly from here :slight_smile:

I am having the same issue - I wiped plex completely from my NAS (including removing directories via SSHing in), and have reinstalled. The moment i add my TV library, go away, come back, and it gives me that error.

I’m at my wits end.

@Glompbot said:
I am having the same issue - I wiped plex completely from my NAS (including removing directories via SSHing in), and have reinstalled. The moment i add my TV library, go away, come back, and it gives me that error.

I’m at my wits end.

You have already raised a forum topic which is being progressed. Please do not double post and progress your issue in the thread that you have already raised

@sa2000 said:

@Glompbot said:
I am having the same issue - I wiped plex completely from my NAS (including removing directories via SSHing in), and have reinstalled. The moment i add my TV library, go away, come back, and it gives me that error.

I’m at my wits end.

You have already raised a forum topic which is being progressed. Please do not double post and progress your issue in the thread that you have already raised

Yup, I posted this before I created my own thread.

@Glompbot said:

@sa2000 said:

@Glompbot said:
I am having the same issue - I wiped plex completely from my NAS (including removing directories via SSHing in), and have reinstalled. The moment i add my TV library, go away, come back, and it gives me that error.

I’m at my wits end.

You have already raised a forum topic which is being progressed. Please do not double post and progress your issue in the thread that you have already raised

Yup, I posted this before I created my own thread.

Sorry. I should have checked the times

I think I am having the same or similar issue.

Attached are my logs and database files.

Any help is appreciated.

@mburton said:
I think I am having the same or similar issue.

Attached are my logs and database files.

Any help is appreciated.

Appears to be the same type of corruption that ferreto1978 had - corruption of a virtual table resulting in the failure and aborting the database schema changes on upgrade of version of Plex Media Server

Nov 07, 2017 14:26:46.862 [0x7f3f42111840] DEBUG - Running migrations.
Nov 07, 2017 14:26:46.863 [0x7f3f42111840] DEBUG - Running forward migration 20170705000000.
. . .
Nov 07, 2017 14:26:48.465 [0x7f3f42111840] ERROR - SQLITE3:0x10, 267, statement aborts at 45: [insert into fts4_tag_titles(rowid, tag) select id, tag from tags where tag_type in (1,2,4,6,207,400)] database disk image is malformed
Nov 07, 2017 14:26:48.466 [0x7f3f42111840] ERROR - Exception inside transaction (inside=1) (../Library/FullTextSearch.cpp:38): sqlite3_statement_backend::loadOne: database disk image is malformed
Nov 07, 2017 14:26:48.466 [0x7f3f42111840] ERROR - Exception inside transaction (inside=1) (../Library/DatabaseMigrations.cpp:195): sqlite3_statement_backend::loadOne: database disk image is malformed
Nov 07, 2017 14:26:48.474 [0x7f3f42111840] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

So what could be tried is the same advice I gave in this post to get the virtual table recreated in the Plex Media Server database
/data/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

  • shutdown Plex Media Server service
  • Save copy of the database
  • The usual dump and re-create steps (outlined in the Repair a Corrupt Database article) - I am giving the windows commands - please adapt for Linux
sqlite3   com.plexapp.plugins.library.db   .dump   >   dump.sql

sqlite3   com.plexapp.plugins.library.db   <   dump.sql
  • Open the database in sqlite3
sqlite3 com.plexapp.plugins.library.db
  • enter these sqlite3 commands
drop table if exists fts4_tag_titles;
CREATE VIRTUAL TABLE fts4_tag_titles USING fts4(content='tags', tag);
.quit

Then launch Plex Media Server service

That worked for me. Thanks for the help.