Help - Something went wrong error

Server Version#: 1.28.1.6104

i am facing an issue after updating to the latest plex media server where i keep getting “Something went wrong” whenever i open my libraries. Please assist. It stopped working on all devices.

Attached is the server logs

Regards,
Plex Media Server Logs_2022-08-24_14-59-35.zip (637.8 KB)

Your database is damaged.

Aug 24, 2022 14:59:08.038 [11296] ERROR - SQLITE3:0x1048a8f2, 779, index corruption at line 91877 of [1b256d97b5]
Aug 24, 2022 14:59:08.038 [11296] ERROR - SQLITE3:0x1048a8f2, 779, statement aborts at 73: [update metadata_item_settings set last_viewed_at = iif(typeof(last_viewed_at) in ('integer', 'real'), last_viewed_at, strftime('%s', last_viewed_at, 'utc')), last_skipped_at = iif(type
Aug 24, 2022 14:59:08.039 [11296] ERROR - Exception inside transaction (inside=1) (E:\jenkins\server\3580563719\Library\DatabaseMigrations.cpp:295): sqlite3_statement_backend::loadOne: database disk image is malformed
Aug 24, 2022 14:59:08.043 [11296] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

You will have to repair it. Once the plex.tv website becomes available again, go here and search for “repair database”: Support Articles | Plex Support

Thanks for the quick reply OttoKerner.

I found the article but i am not very good with CMD. can you give me a few pointers?

after i use the cd command to go to the directory of the database file, i am not sure how to use sqlite. The article is not very clear

Careful that you use the right version of that article. It should note the server software version numbers at the top, for which it is valid.

Alternatively, you can try to restore an earlier backup of your database.

Yes, i saw the article for version 1.23.2 and above. As for restoring an earlier backup. That unfortunately did not solve the issue. It seems i need to repair it.

Any help would be appreciated. I am not able to use sqlite properly

sqlite comes with Plex already.
You can copy and paste the commands from the article. You just need to make sure to copy them in full- (look out for those horizontal scroll bars!)
Pasting in the command prompt window is simply done by right-clicking once with your mouse at the blinking command prompt.

  • make sure Plex server is not running (look for the Plex logo in the task tray area)
  • open a command prompt (run cmd.exe)
  • it should already have drive C: as the current drive letter. You can type c:+Enter to make sure it is at drive C
  • then type (or paste) cd "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases"+Enter
    unless you have previously moved the location of your Plex data folder
    The command prompt should now show the current path.
  • now type (or paste) the first line from the article, which is simply creating a safety copy of the database file copy com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original+Enter
  • Once that is done, you can enter the sqlite tool by typing (or pasting) "C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db
    (the above won’t work if your plex server has been already updated to the 64 bit preview version)

Then continue with the next steps from the article.

Thank you again Otto for the support, i have a grasp on how to use it now thanks to these instructions, i managed to find errors when i performed an integrity check to the plexapp.plugins.library.db file which were repaired with the REINDEX command. However i still face the same error, i even tried the Vacuum command. attached are the logs

Any thing else i can try?
Plex Media Server Logs_2022-08-24_18-33-30.zip (846.5 KB)

No, the “reindex” and “vacuum” commands are not able to repair major damage.
You need to perform the “Low-level database recovery” steps.

Thank you! i reinstalled PMS and it worked. i didnt need the low-level database recovery option. But i will keep it mind for the future in case there is major damage (i hope not). Seems that in my case, it was a minor issue.

1 Like

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