Plex Media Server Insta-crashes - trouble reinstating a backup

Server Version#: 1.42.1.10060-4e8b05daf
Player Version#:

Running Plex Media Server on a brand new M4 Mac Mini with latest version of Sequoia OS.

Having just migrated over from my MacBook Pro to the Mini, I realized I lost all my local and/or preferred media (preferred posters, backgrounds, collections, etc) I spent Labor Day weekend rebuilding all that from scratch. For 1000+ movies, that’s a slog.

This afternoon, things were starting to look pretty good. I had all my collections, preferred posters, backgrounds and episode cards in place. Transferring some media files over to the Mini started to feel sluggish, so I quit the transfer and restarted the Mini to freshen things up.

Upon restart, Plex Media Server (let’s just call it PMS from this point forward…) refused to launch. Double-clicking the icon or selecting Open from the Finder just “launched” it for a tenth of a second and promptly quit. No sign-in, no browser page load, nothing.

I backed up the Plex Media Server folder (3GB worth!) inside

~Library/Application Support

and com.plexapp.plexmediaserver.plist inside

~Library/Preferences

Uninstalled PMS per instructions on their help docs. Including Cache files. Restarted as instructed. Since they stated to re-install PMS *after* replacing the backup files above, I did so, and still got the launchquit as above.

Did another complete uninstall and restart. This time installed and ran PMS, getting to the login screen. From there, replaced the App Support and Prefs files above. Now PMS doesn’t recognize any of my libraries, even after logging out/in and restarting. The files are on hard drives connected to the Mini and clearly accessible in the Finder. Deleted the PMS folder in Application Support and replaced with the backup. Launching PMS gets the same launchquit behavior.

This leads me to believe something is messed up within the Application Support backup (the 3GB folder). Doing another complete uninstall and fresh install (with issue regarding Libraries not being recognized). Assuming a fresh install and I had to manually replace folders inside the App Support folder to reinstate my local preferred media files and collections, which would those folders be? Guessing Media, Metadata and Thumbnails?

Finally, anyone else had a similar issue? I really don’t want to spend another three days manually reselecting my posters, backgrounds, title cards and collections. Surely this stuff remains in the backup somewhere, even though some of it seems to be corrupted?

Thanks for the long read and in advance for your advice.

Just for clarification…
Is PMS properly running or crashing on start?
You mentioned insta-crashes but also being able to access the server (though, it not showing any of your config/structures/data).

If the server is starting but not showing your stuff, server logs might provide some clues (e.g. if there’s some corruption after the hard reboot when transfers slowed down, or from restoring your backup via TimeMachine).
If the server doesn’t start, the command line might provide some information on why that is:

If the Plex Media Server won’t start and doesn’t even get to the stage where it’ll be writing to the server logs, you can attempt the following procedure to see if there’s any error messages on the OS level:

  1. Open Finder and navigate to /Applications
  2. Select Show Content from the context menu of the Plex Media Server.app item
  3. Navigate to Contents/MacOS
  4. Open the Terminal app
  5. Drag the Plex Media Server executable from the Finder window (#3) into the Terminal Window and press Return to execute it

This is no different from running the app, so it won’t succeed – but you should get a more specific error message about what’s causing it to fail starting.

Hi Tom - thanks for the reply. Let me try to clarify the insta-crash scenario:

After restarting the slow computer, Plex insta-crashed on launch. Backing up the PMS folder in Application Settings, I then did a complete uninstall/delete and re-install of PMS.

Per the support doc instructions, I replaced the PMS folder in Application Support PRIOR to launching the PMS app initially. This also resulted in insta-crash.

After another complete uninstall/delete, I then launched PMS without replacing the PMS folder in Application Support. This resulted in the server starting (presumably creating fresh versions of PMS App Support folders, preferences file, etc). Prior to logging into the server, I then replaced the PMS Application Support folder. It identified my prior Library names, but did not re-establish the connections. See attached screen shots of both Home and Movies tab views.

After another complete uninstall/delete, I installed another fresh instance of PMS - didn’t replace anything with my backup, and tried to connect with my Movies folder on one of my external drives. It started to re-ingest the movies, but not the preferred posters, collections, backgrounds, title cards (all the days of custom work). Stopped that mid-process and am asking if there’s a way to get the best of both worlds - a fresh set of connections to my libraries WITH all my prior work on custom posters, collections, etc restored. My hypothesis is this involves a combination of fresh install and re-established library connections, PLUS selective replacement of certain files from Application support, maybe some parameters?

In the meantime, I do know how to replicate the conditions that resulted in the insta-crash, so I will try your suggestion to collect OS-level error messages and will post here to see if they provide additional insight.

After trying Tom’s suggestion above, I re-created the conditions which caused the insta-crash and looked at OS level error message in the Terminal window. It appears I have a “malformed database schema”.

Back to my other question - is there a way to combine a fresh install with a restoration of some elements of my backup to bring back the bespoke work/media for posters, collections, backgrounds and title cards?

Sounds like the active database backup is corrupted. As I wrote, this can happen when restoring the directory from a Time Machine backup, or if your server got stopped while writing to the database.

You can attempt to repair the database, e.g. using this script:

Alternatively you can try to restore a database backup created as a scheduled job by your PMS (if enabled):
https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

I tried the second technique on a backup database from prior to the crash, which restored what seems to be about 80% of things. I’ll take it! Not very comfortable with command line stuff.

Missing is artwork and contents for all my smart collections and random posters, backgrounds and title cards from movies and TV shows. A refresh of metadata for the Music section brought back all the cover art from the CDs I scanned.

So lesson learned is to be more fastidious on backing stuff up as it appears PMS is pretty fragile, and can cost you a lot of bespoke work if it goes kaput.

Another lesson is to keep a backup copy (away from PMS entirely) of all bespoke posters, backgrounds , title cards and genre posters as an inexplicable random number of them can “go missing” after a crash, even after restoring from a backup. Searching for these local files just comes up missing. Refreshing metadata for a library replaces your custom posters with ones from the internet, which may be a setting I need to tweak somewhere.

Anyhoo - I’m glad I don’t have to re-do EVERYthing, so I greatly appreciate the pointers, Tom!

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