PMS still crashing regularly on 1.23.5.4801

Server Version#: 1.23.5.4801

I’ve tried rolling back and also moving to beta channel, but I am still seeing PMS on macOS 11.4 crashing regularly (multiple times per day). Things also won’t get marked as played correctly either. Something seems very wrong here. What’s going on over there, Plex?

Configure your Plex server for debug logging.
After the next crash, pull the server log files and add the entire zip file to the thread.
Someone familiar with running Plex on a Mac will be able to assist.

See this support article for details on configuring debug level logging and pulling the log files.

1 Like

Thanks, I appreciate the advice. I’ve got debug logging on and verbose turned off. I’ll post them after the next crash.

Something very wrong has happened here. I am attaching server logs, but I noticed immediately they mentioned a database corruption. So I ran the new db repair process, and then started PMS again.

Strange behavior I am noticing:

  1. Some items (but not all items) cannot be marked as played any more.
  2. I no longer have On Deck. I’m not sure if this feature has been removed for everyone or if its just missing for me now.
  3. I can see TV shows and episodes in the Home hub under Recently Added in TV and I can click into the shows and the various seasons - but when I go to the TV library itself I get: “Something went wrong. An unexpected error occurred.” and this appears to be true for the Music library too but not Movies or Videos.

I’m a pretty savvy technical user, but this is starting to upset me that it’s just broke like hell this badly totally out of the blue.

Database corruption manifests itself in strange ways, such as what you are seeing. If the corruption is severe, the Plex Media Server will crash as soon as it tries to access the database during startup.

From Plex Media Server.log:

The most recent Plex restart in the log files is at 18:19:15:
Jul 15, 2021 18:19:15.764 [0x70000c97d000] DEBUG - BPQ: [Idle] -> [Starting]

Database corruption reported at 18:26:53:

Jul 15, 2021 18:26:53.742 [0x70000db13000] ERROR - SQLITE3:0x10e47a558, 11, database corruption at line 81887 of [1b256d97b5]
Jul 15, 2021 18:26:53.742 [0x70000db13000] ERROR - SQLITE3:0x10e47a558, 11, statement aborts at 11: [select metadata_items.id from metadata_item_settings left join metadata_items on metadata_items.guid=metadata_item_settings.guid  and account_id=? where view_count>=1 and metadata_type
Jul 15, 2021 18:26:53.742 [0x70000db13000] ERROR - Soci Exception handled: sqlite3_statement_backend::loadRS: database disk image is malformed

You’ve three options:

  1. Repair it.
  2. Replace it with a backup.
  3. Delete it and start over.

If the repair process does not work, you can try replacing it with a backup. Plex makes a backup every three days if you’ve enabled the task in Settings → Scheduled Tasks.

You can try loading the backup, then checking the logs to make sure it is not corrupt as well. If it is OK, you’ll lose a few days of play history, etc. Rescanning the libraries will pick up any media you added since the backup was taken.

If all else fails, you can delete the database and start over. You’ll have to re-create your libraries and re-share them with any other users on your server.

Restore a Database Backed Up via ‘Scheduled Tasks

Repair a Corrupted Database - PMS 1.23.2 & newer

Thank you for the advice. That was my next guess, restore from an older Time Machine backup of the DB files (which I’ve had to do before). It’s been going on for more than 3 days, so I needed an older copy. So far that seems to have gotten me back on track for now, but we’ll keep an eye on things. I appreciate the help!

A couple of additional things I noticed in the log files…

It looks like you have Plex scanning the folder where you download TV shows, /Volumes/Seagate2 8TB/BitTorrent2. If so, don’t. The Plex scanners will continuously scan the folder since the contents are always changing. This can lead to database corruption.

Also, the naming and organization of the media in the folder is nowhere close to Plex recommendations. See Naming & Organizing Your Media.

Plex is very picky with TV show naming and organization. Follow the recommended format for best results. What you’re doing may work now, but at some point it will break.

Examples from Plex Media Scanner log files:

Jul 15, 2021 18:25:11.517 [0x10ac7fe00] DEBUG - Looking for path match for [/Volumes/Seagate 8TB/BitTorrent/Game.of.Thrones.S07.720p/Game.of.Thrones.S07E04.The.Spoils.of.War.720p.AMZN.WEB-DL.DDP5.1.H.264-GoT.mkv]

Jul 15, 2021 18:01:11.110 [0x1155a0e00] DEBUG - Looking for path match for [/Volumes/Seagate 8TB/BitTorrent/Battlestar.Galactica.2003.S00.E10-E19.The.Face.Of.The.Enemy.1080p.AAC3.2.0.x265.mkv]

Jul 15, 2021 18:01:09.743 [0x1155a0e00] DEBUG - Looking for path match for [/Volumes/Seagate2 8TB/BitTorrent2/Star.Trek.Enterprise.S03.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-EPSiLON/Star.Trek.Enterprise.S03E13.Proving.Ground.1080p.BluRay.REMUX.AVC.DTS-HD.MA.5.1-EPSiLON.mkv]

Every show needs to be in its own folder and use subfolders for each season. Battlestar Galactica 2003 is not in its own folder. Neither Game of Thrones nor Star Trek Enterprise use the correct show/season xx format.

The correct naming & structure for Game of Thrones is:

/Game of Thrones
../Season 07
..../Game.of.Thrones.s07e04.The.Spoils.of.War.mkv

If you want to keep the resolution and other info, place it in square brackets so the Plex scanners will ignore it. Ex: Game.of.Thrones.S07E04.The.Spoils.of.War [720p.AMZN.WEB-DL.DDP5.1.H.264-GoT].mkv

Battlestar Galactica is a multi-episode file, which is fine. However, the naming is incorrect.
Instead of: Battlestar.Galactica.2003.S00.E10-E19.The.Face.Of.The.Enemy.1080p.AAC3.2.0.x265.mkv
Use: /Battlestar Galactica (2003)/Season 00/Battlestar Galactica (2003).S00E10-E19.The.Face.Of.The.Enemy [1080p.AAC3.2.0.x265].mkv
The main difference is S00E10-19 vs S00.E10-19 (no period after s00). I know it sounds picky, and it is, but it works.

Thanks for the advice. I’ve only had severe database corruption twice before, and it manifested in totally different ways than this seemingly buggy behavior. That’s why I was confused about the symptoms this time being database corruption related, but I started to have my suspicions in recent days.

Yes, I definitely take care of the BT target folder being scanned by Plex resolved via other means. I did have that issue early on and quickly realized what was going on.

My naming conventions aren’t ideal, but I’ve been too lazy to go back and fix it. I have done some manual matching and such. It does work fine currently, but I hear you that its not sustainable.

Thanks again!

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