Plex Mac server continually crashing. Database locked?

Server Version#: 1.23.6.4810
Player Version#: N/A

My Plex server on Mac M1 Mac Mini continually crashes. Each crash occurs, after about a minute and twenty seconds after startup.
One thing I noticed in the Console: The red errors say that the database is locked.
Updated to Big Sur OS X 11.5 yesterday. Server ran fine for about 12 hours after update, however, so I am not sure it is related.

Plex Media Server Logs_2021-07-25_07-44-50.zip (1.1 MB)

From user dokuro: “Has anyone tried just leaving the the server running after upgrade for an hour (or couple of hours) to give plex time to do it’s stuff?”
Apparently after about TWELVE HOURS the server appears to be fine. WTF?

Having continuous crashing errors playing on Mac M1 Mini Big Sur 11.6.
The server is running on an old 2011 mac mini High Sierra 10.13.6 fine. It sits there running for days, no problem.
Try to play a song across the ethernet network on the M1 and it quits after a minute every time. Even when not actually playing anything.

Was hoping the latest updates might have fixed it but alas.

Debug Server Logs captured after a crash would be the way to start an investigation

Plex Media Server Version 1.24.4.5081-e362dc1ee on M1 Mac Mini
says server is starting then crashes. I have not been able to log in. I have been able to click “check for updates” before it crashes and am the webpage says “safari can’t connect to the server”

could you look for log files and copy them out and zip the copy

They would be here
~/Library/Logs/Plex Media Server/

Also please look for any crash reports within these directories

~/Library/Application Support/Plex Media Server/Crash Reports/1.24.4.5081-e362dc1ee/PLEX MEDIA SERVER

and also look here

~/Library/Logs/CrashReporter/
~/Library/Logs/DiagnosticReports/

Any you find - please zip and attach zip file

Thanks for your here are the files from ~/Library/Logs/Plex Media Server/, the other 3 locations were empty. Plex.zip (523.7 KB)

Appears to be a corrupt database

Oct 06, 2021 23:23:35.990 [0x30b50a000] ERROR - Exception inside transaction (inside=1) (/data/jenkins/server/1790383038/Library/FullTextSearch.cpp:90): sqlite3_statement_backend::loadOne: database disk image is malformed
Oct 06, 2021 23:23:35.991 [0x30b50a000] ERROR - Exception inside transaction (inside=1) (/data/jenkins/server/1790383038/Library/DatabaseMigrations.cpp:237): sqlite3_statement_backend::loadOne: database disk image is malformed
Oct 06, 2021 23:23:35.995 [0x30b50a000] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed
Oct 06, 2021 23:23:36.000 [0x30b50a000] ERROR - SQLITE3:(nil), 11, database corruption at line 69874 of [1b256d97b5]
Oct 06, 2021 23:23:36.000 [0x30b50a000] ERROR - SQLITE3:(nil), 11, statement aborts at 4: [select max(max(metadata_items.changed_at),max(metadata_items.resources_changed_at)) from metadata_items] database disk image is malformed
Oct 06, 2021 23:23:36.001 [0x30b50a000] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database disk image is malformed
Oct 06, 2021 23:23:36.001 [0x30b50a000] ERROR - Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10soci_errorE)

See if you can repair it following instructions here Repair a Corrupted Database | Plex Support

Other option is to restore from a backup - see
https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

I could not get either option to work. In the link to repair a corrupted database it mentioned that " You can also simply delete the com.plexapp.plugins.library.db database file while the Plex Media Server is not running. Restarting the server will then restore your server to a nearly-fresh install state. (i.e. You will lose your existing libraries and need to recreate them , but you won’t be affecting your content itself.)"

I deleted the “com.plexapp.plugins.library.db” and the server is still starting up then crashing-

What do you recommend next?

Could I have evidence of that - if you repeat the deletion and then get me directory listing to confirm that - was there other db filename extensions - eg

com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-wal

So after deletion - launch Plex Media Server and if it still fails to load and show no libraries then please get me zip of the server logs

I could not repeat deletion as I could not locate a new “com.plexapp.plugins.library.db” file. I have attached the server logs here:Plex.zip (524.7 KB)

Also when I attempted to launch Plex Media Server I again clicked on “check for updates…” and get the error “safari can’t connect to the server”

Thanks for the logs.zip

The logs cover period from Oct 06, 2021 23:23:25 to Oct 12, 2021 23:50:05

I cannot find any evidence of the database being deleted during this whole period
On each launch of Plex Media Server the database file existed already

Where were you deleting the db file?

The database files would be here

"/Users/jasonfeatherngill/Library/Application Support/Plex Media Server/Plug-in Support/Databases"

which db file were you repairing or restoring from ? exact path please - screenshot of the folder contents you were working with

In the application support path there is no folder for Plex Media Server (see screen shot-1) I erased the com.plexapp.plugins.library.db file inside the Plex media server application (see screen shot-2)

I have recently upgraded to a newer drobo and have copied many files over the last few weeks. At this point I would love nothing more than to delete Plex media server and start fresh. There is also an issue when Plex media server is beginning to launch- I click on “check for updates…” and get the error “safari can’t connect to the server”

Can you help me delete everything so I can just start over? These other solutions are a bit out of my comfort zone. Thanks again for your help so far!!


The folders/files are hidden - Access to the application data files is mentioned in this article
Where is the Plex Media Server data directory located? | Plex Support - for Mac OS it says

Using the Finder’s “Go” menu, select Go To Folder… then enter the following in the dialog box that pops up:

~/Library/Application Support/Plex Media Server/

Must not tamper with the contents of the application / binary files
Please remove the app and re-install Plex Media Server so that we do not having any missing files

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