# Plex Mac server continually crashing. Database locked?

**URL:** <https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699>\
**Category:** Plex Media Server\
**Tags:** server-mac\
**Created:** [July 25, 2021, 1:00pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699 "2021-07-25T13:00:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![iconbobby](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/iconbobby/32/247894_2.png) [@iconbobby](https://forums.plex.tv/u/iconbobby)\
**Post date:** [July 25, 2021, 1:00pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/1 "2021-07-25T13:00:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![iconbobby](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/iconbobby/32/247894_2.png) [@iconbobby](https://forums.plex.tv/u/iconbobby)\
**Post date:** [July 25, 2021, 1:08pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/2 "2021-07-25T13:08:07Z")

</div>

[Plex Media Server Logs\_2021-07-25\_07-44-50.zip](https://forums.plex.tv/uploads/short-url/lLzihZQTORfIow0k28KRLhKkJK9.zip) (1.1 MB)

---

<div class="post-metadata">

**Author:** ![iconbobby](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/iconbobby/32/247894_2.png) [@iconbobby](https://forums.plex.tv/u/iconbobby)\
**Post date:** [July 25, 2021, 1:31pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/3 "2021-07-25T13:31:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rob\_vivid\_net\_au](https://avatars.discourse-cdn.com/v4/letter/r/8491ac/32.png) [@rob\_vivid\_net\_au](https://forums.plex.tv/u/rob_vivid_net_au)\
**Post date:** [October 5, 2021, 12:47am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/4 "2021-10-05T00:47:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [October 6, 2021, 11:40am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/5 "2021-10-06T11:40:53Z")

</div>

> [@rob\_vivid\_net\_au](#):
>
> Having continuous crashing errors playing on Mac M1 Mini Big Sur 11.

Debug [Server Logs](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) captured after a crash would be the way to start an investigation

---

<div class="post-metadata">

**Author:** ![Mrbungled19](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mrbungled19](https://forums.plex.tv/u/Mrbungled19)\
**Post date:** [October 7, 2021, 4:24am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/6 "2021-10-07T04:24:09Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [October 8, 2021, 10:16am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/7 "2021-10-08T10:16:35Z")

</div>

> [@Mrbungled19](#):
>
> 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

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

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

```

and also look here

```auto
~/Library/Logs/CrashReporter/
~/Library/Logs/DiagnosticReports/

```

Any you find - please zip and attach zip file

---

<div class="post-metadata">

**Author:** ![Mrbungled19](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mrbungled19](https://forums.plex.tv/u/Mrbungled19)\
**Post date:** [October 8, 2021, 4:47pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/8 "2021-10-08T16:47:18Z")

</div>

> [@sa2000](#):
>
> ~/Library/Logs/Plex Media Server/

Thanks for your here are the files from ~/Library/Logs/Plex Media Server/, the other 3 locations were empty. [Plex.zip](https://forums.plex.tv/uploads/short-url/fYEUzyFjYOU8moluMqr5MayU3o8.zip) (523.7 KB)

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [October 11, 2021, 12:45pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/9 "2021-10-11T12:45:55Z")

</div>

> [@Mrbungled19](#):
>
> Thanks for your here are the files from ~/Library/Logs/Plex Media Server/, th

Appears to be a corrupt database

```auto
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](https://support.plex.tv/articles/repair-a-corrupted-database/)

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

---

<div class="post-metadata">

**Author:** ![Mrbungled19](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mrbungled19](https://forums.plex.tv/u/Mrbungled19)\
**Post date:** [October 11, 2021, 9:03pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/10 "2021-10-11T21:03:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [October 13, 2021, 9:51am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/11 "2021-10-13T09:51:53Z")

</div>

> [@Mrbungled19](#):
>
> 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](https://support.plex.tv/articles/200250417-plex-media-server-log-files/)

---

<div class="post-metadata">

**Author:** ![Mrbungled19](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mrbungled19](https://forums.plex.tv/u/Mrbungled19)\
**Post date:** [October 13, 2021, 6:09pm UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/12 "2021-10-13T18:09:51Z")

</div>

> [@Mrbungled19](#):
>
> com.plexapp.plugins.library.db

I could not repeat deletion as I could not locate a new “com.plexapp.plugins.library.db” file. I have attached the [server logs](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) here:[Plex.zip](https://forums.plex.tv/uploads/short-url/vsnsh5COAWLa75CXp8ZrRcMYpCN.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”

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [October 15, 2021, 9:36am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/13 "2021-10-15T09:36:04Z")

</div>

> [@Mrbungled19](#):
>
> I deleted the “com.plexapp.plugins.library.db” and the server is still starting up then crashi

> [@Mrbungled19](#):
>
> I could not repeat deletion as I could not locate a new “com.plexapp.plugins.library.db” fil

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"`

> [@Mrbungled19](#):
>
> I could not get either option to work. In the link to repair a corrupted database it mentioned that "

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

---

<div class="post-metadata">

**Author:** ![Mrbungled19](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mrbungled19](https://forums.plex.tv/u/Mrbungled19)\
**Post date:** [October 16, 2021, 12:32am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/14 "2021-10-16T00:32:48Z")

</div>

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!!

 ![Screen Shot-1](https://global.discourse-cdn.com/plex/original/4X/6/c/1/6c131108a7b3bdd3a2b919643957d73b53d1c6f6.png)  
 ![Screen Shot-2](https://global.discourse-cdn.com/plex/original/4X/b/f/c/bfc699538f9f5389c44d2b5089df7c7aeeb80971.png)

---

<div class="post-metadata">

**Author:** ![sa2000](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/sa2000/32/6922_2.png) [@sa2000](https://forums.plex.tv/u/sa2000)\
**Post date:** [October 18, 2021, 10:35am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/15 "2021-10-18T10:35:49Z")

</div>

> [@Mrbungled19](#):
>
> In the application support path there is no folder for Plex Media Server (see screen shot-1)

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](https://support.plex.tv/articles/202915258-where-is-the-plex-media-server-data-directory-located/) - 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:

```auto
~/Library/Application Support/Plex Media Server/

```

> [@Mrbungled19](#):
>
> I erased the com.plexapp.plugins.library.db file inside the Plex media server application (see screen shot-2)

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 16, 2022, 10:36am UTC](https://forums.plex.tv/t/plex-mac-server-continually-crashing-database-locked/731699/16 "2022-01-16T10:36:29Z")

</div>

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