My Plex database is broken when I update to a newer version

Server Version#:1.26.1.5798
Player Version#:1.44.0.2981-e2d72ac2
Docker image: linuxserver/plex
Hardware: Synology ds1520+ DSM7
Plex server log: Plex logs.zip (1.9 KB)

Hi all,

I am really struggling to get my Plex working again. My current version is 1.25.9.5673-bf5697c5d and my media is working on that version.

When I upgrade to the newest version of plex I get “something went wrong” on my libraries.
I already tried repairing the database automatically and manually. But no success. I also tried optimizing and repairing before upgrading.

For now, I had to roll back to my previous plex version to get my media working.
Is there someone that can help me with this problem? I really don’t want to lose my database with stats in it.

Thanks

I am having the same issue. Anything past Version 1.25.8.5663 causes all of my libraries to show “Something went wrong”

I tried a database repair but the only thing that works is a version roll back.

I’m running my server on Ubuntu 20.04.4 LTS bare metal and I keep it up to date.

If you check for database corruption does it detect anything?

Database check gives no errors, just a OK message.

Anyone?

Looking at your logs, the issue might start here:
WARN - Failed to create temp dir “/tmp/pms-8a7f21b5-6762-4429-9795-a76af984e9e9”: 13, Permission denied

When I get home I’m going to try my upgrade again and check my logs. If I’m getting a similar line I will check permissions and group settings. I’ll follow up and let you know if that fixes anything.

Just got it fixed. I don’t know how but I did two things.

  • I deleted a tv database file because I don’t have any dvr enabled in plex.
  • I fixed the file permissions for the /tmp folder

After the above steps, I optimized the database en upgraded it to the new versions without problems.

What did you change on the permissions?

The ownership to the plex user and chmod 775 of the file tmp in the root folder.

If I may add here?

“Something went wrong” when you’re trying to open the Plex/web view doesn’t automatically mean you have a bad database.

All Plex/web is telling you (because it’s not very smart and can’t tell the difference) is

It was able to connect to PMS
It then made its request for data
PMS is being too slow responding

This is important because Engineering made a major schema changes at 1.25.4

When you installed 1.25.4,

  1. PMS looked at the database schema
  2. If not damaged – it continues startup
    – the server engine
    – the web server
    AND
    – the database migrations (updates) process
    – EVERYTHING waited for the DB to upgrade – which took time.

Since then, they have continued to adjust the database schema.

Please notice here where it looks like they’ve completed their work:

Per the OP’s statement of the database being broken,

  1. The snippet provided (which is error-only and not DEBUG logging) does not show any errors

  2. A DB recovering frames from previous abrupt shutdown is normal and indicative of a healthy DB.

  3. /tmp should be 777 permissions as set by the the OS at start. This is most likely the cause of the problem.

May 19, 2022 19:11:58.710 [0x7f65e836fd50] WARN - Failed to create temp dir "/tmp/pms-8a7f21b5-6762-4429-9795-a76af984e9e9": 13, Permission denied
May 19, 2022 19:11:58.772 [0x7f65e836fd50] ERROR - SQLITE3:0x80000001, 6410, statement aborts at 254: [update metadata_items set originally_available_at = iif(typeof(originally_available_at) in ('integer', 'real'), originally_available_at, strftime('%s', originally_available_at)), avai
May 19, 2022 19:11:58.772 [0x7f65e836fd50] ERROR - Exception inside transaction (inside=1) (/data/jenkins/server/3533902054/Library/DatabaseMigrations.cpp:237): sqlite3_statement_backend::loadOne: disk I/O error
May 19, 2022 19:11:58.772 [0x7f65e836fd50] ERROR - SQLITE3:0x80000001, 1, statement aborts at 1: [ROLLBACK] cannot rollback - no transaction is active
May 19, 2022 19:11:58.772 [0x7f65e836fd50] ERROR - Failed to roll back transaction (/data/jenkins/server/3533902054/Library/DatabaseMigrations.cpp:181): Cannot rollback transaction. cannot rollback - no transaction is active
May 19, 2022 19:11:58.775 [0x7f65e836fd50] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: disk I/O error
May 19, 2022 19:11:58.979 [0x7f65e836fd50] ERROR - SQLITE3:0x80000001, 6410, statement aborts at 7: [INSERT INTO vacuum_db.'blobs' SELECT*FROM"main".'blobs'] disk I/O error
May 19, 2022 19:11:58.981 [0x7f65e836fd50] ERROR - SQLITE3:0x80000001, 10, statement aborts at 1: [VACUUM] disk I/O error
May 19, 2022 19:11:58.983 [0x7f65e836fd50] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: disk I/O error
May 19, 2022 19:11:59.012 [0x7f65e836fd50] INFO - [CERT/OCSP] Successfully retrieved response from cache.
May 19, 2022 19:11:59.306 [0x7f65e5e75b38] WARN - [MediaProviderManager] Unrecognized MediaProvider feature: availability
May 19, 2022 19:11:59.306 [0x7f65e5e75b38] WARN - [MediaProviderManager] Unrecognized MediaProvider feature: availability-platforms
May 19, 2022 19:11:59.322 [0x7f65e5f72b38] WARN - [MediaProviderManager] Unrecognized MediaProvider feature: availability
May 19, 2022 19:11:59.322 [0x7f65e5f72b38] WARN - [MediaProviderManager] Unrecognized MediaProvider feature: availability-platforms
May 19, 2022 19:12:00.708 [0x7f65e5dc6b38] WARN - Crash: Crash reporting disabled
May 19, 2022 19:12:01.664 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 283, recovered 411 frames from WAL file /config/Library/Application Support/Plex Media Server/Plug-in Support/Databases/tv.plex.providers.epg.xmltv-11d5ab42-4641-4d1a-b5b6-b6a3d24ace23.db-wal
May 19, 2022 19:12:01.751 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.755 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.759 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.762 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.765 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.769 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.772 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.775 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.778 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.903 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.906 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.908 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.913 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.916 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.919 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.922 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.925 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:01.928 [0x7f65e5d80b38] INFO - SQLITE3:0x80000001, 17, statement aborts at 57: [select * from metadata_items limit 1] database schema has changed
May 19, 2022 19:12:02.134 [0x7f65e570ab38] INFO - AutoUpdate: no updates available
  1. If desired, a directory other than /tmp can be used
  • set TMPDIR in an override.conf file.
  • change where /tmp maps to in a Docker file.

Recommend turning DEBUG logging back on as it doesn’t save space or CPU but does make diagnosis of issues possible,

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