# Plex crashing overnight

**URL:** <https://forums.plex.tv/t/plex-crashing-overnight/836818>\
**Category:** Plex Media Server\
**Tags:** server-unraid\
**Created:** [April 5, 2023, 3:41pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818 "2023-04-05T15:41:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 5, 2023, 3:41pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/1 "2023-04-05T15:41:29Z")

</div>

I’m running PMS on unraid in docker. Every night the container crashes and needs to be restarted. Please could somebody have a look at my log files. Thank you.  
[Plex Media Server Logs\_2023-04-05\_10-26-31.zip](https://forums.plex.tv/uploads/short-url/a5D4gWYza0i9e21LRSlGiR7dXZO.zip) (3.9 MB)

Server Version#: 1.31.3.6868  
Player Version#: 4.100.1  
\<If providing [server logs](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) please do NOT turn on verbose logging, only [debug logging](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/#toc-1) should be enabled\>

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 6, 2023, 4:57pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/2 "2023-04-06T16:57:15Z")

</div>

[Plex Media Server Logs\_2023-04-06\_10-45-16.zip](https://forums.plex.tv/uploads/short-url/joPX9PTUZPyblRNFJP4nZ9LkGP5.zip) (4.7 MB)

Here are the complete logs from an hour ago after restarting an unresponsive PMS. It appears to have hung around 8am server time. @ChuckPa can you offer any insight on this? I would be much appreciated.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [April 6, 2023, 6:41pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/3 "2023-04-06T18:41:38Z")

</div>

Thank you … I’m going through them now.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [April 6, 2023, 7:05pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/4 "2023-04-06T19:05:42Z")

</div>

I found in your logs where PMS got totally jammed up on the database.

It got so bad that it gave up.

Questions:

1. Is PMS installed on HDD or SSD ?
2. Approximately how many items do you have indexed ?
3. When’s the last time the DB was optimized (fully) ?

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 6, 2023, 7:16pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/5 "2023-04-06T19:16:57Z")

</div>

Hi-

1. PMS is on SSD
2. 31523 episodes and 2924 movies
3. I ran your script yesterday Auto. Afterwards I optimized the db in plex.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [April 6, 2023, 7:23pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/6 "2023-04-06T19:23:07Z")

</div>

That’s not good.

1. Your i9 is a screamer.
2. Hopefully your SSD is NVMe and has recently been trimmed.

I’m half inclined to:

1. stop PMS
2. Make a backup of the databases directory by hand
3. Upgrade the image to 1.32.0
4. Let those fixes get in there.

I say this because I’m running now on both this babynuc unraid and a Syno DS418j (ARMv8 with 1GB ram) and it’s not failing.

Something is slowing you down – badly…  
Are there any other CPU or I/O intensive tasks running?

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 6, 2023, 7:36pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/7 "2023-04-06T19:36:20Z")

</div>

SSD is NVMe and I have it set to trim daily.

How do I upgrade to 1.32.0? I can manually backup the db directory. There are no other CPU or I/) intensive tasks running.

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 6, 2023, 7:55pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/8 "2023-04-06T19:55:02Z")

</div>

I’m using linuxserver/docker-plex

Should I switch to binhex/arch-plexpass?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [April 6, 2023, 8:01pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/9 "2023-04-06T20:01:55Z")

</div>

there is no need to switch to those.

They are only our binaries repackaged in their images  
(PMS source is not public)

1. Go into the container
2. /plex\_service.sh -d (stop it)
3. Now get into “/config/Library/Application Support/Plex Media Server/Plug-in Support”
4. Nice easy way to make a backup

```auto
tar cf DB-Backup-2023-04-06.tar ./Databases

```

1. You now have the entire “Databases” directory saved

Should you ever need restore it:

```auto
rm -rf Databases (to clear out the existing)
tar xf DB-Backup-2023-04-06.tar

```

Make sense ?

EDIT:

I don’t remember the LSIO stop command. (check the directory structure) Either

1. `s6-svc -d /var/run/service/svc-plex`  
-or-
2. `s6-svc -d /var/run/s6/services/plex`

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 6, 2023, 8:28pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/10 "2023-04-06T20:28:25Z")

</div>

OK thanks. How do I upgrade the image?

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 6, 2023, 8:54pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/11 "2023-04-06T20:54:18Z")

</div>

I’m running 1.32.0.6865 now. Is there anything else I should be doing?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [April 6, 2023, 10:18pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/12 "2023-04-06T22:18:50Z")

</div>

> [@dob312](#):
>
> OK thanks. How do I upgrade the image?

C’mon… You’re using docker… That is something you should already know.

Lemme give you a hint… You want to pull a new version 😉

As for what to do next. I would:

1. Run my DBRepair tool to get the DB fully optimized
2. Make certain your Intro and credits detections are set where you want them.
3. Now wait until morning.

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 6, 2023, 11:03pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/13 "2023-04-06T23:03:17Z")

</div>

done. I will report back 🙂

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 7, 2023, 8:36pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/14 "2023-04-07T20:36:14Z")

</div>

I ended up doing a fresh install. Now I’m trying to Move Viewstate/Ratings from One Install to Another using [https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/](https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/)

Any idea how to install Sqlite3?

---

<div class="post-metadata">

**Author:** ![dbirch](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@dbirch](https://forums.plex.tv/u/dbirch)\
**Post date:** [April 7, 2023, 11:45pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/15 "2023-04-07T23:45:09Z")

</div>

See [GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases](https://github.com/ChuckPa/PlexDBRepair)

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 7, 2023, 11:48pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/16 "2023-04-07T23:48:51Z")

</div>

I’ve done that. Nothing was saving the db so I started over. Now I just want to merge the Viewstate and Ratings from the old db to the new. Having an issue with Sqlite3 following the guide I posted

---

<div class="post-metadata">

**Author:** ![dbirch](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@dbirch](https://forums.plex.tv/u/dbirch)\
**Post date:** [April 7, 2023, 11:53pm UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/17 "2023-04-07T23:53:36Z")

</div>

> [@dob312](#):
>
> I’ve done that.

No you haven’t.  
`8 - 'import' viewstate (Watch history) from another PMS database`

You missed that functionality

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 8, 2023, 12:05am UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/18 "2023-04-08T00:05:57Z")

</div>

I see that now. What is the db with watch history?

---

<div class="post-metadata">

**Author:** ![dbirch](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@dbirch](https://forums.plex.tv/u/dbirch)\
**Post date:** [April 8, 2023, 12:07am UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/19 "2023-04-08T00:07:18Z")

</div>

> [@dob312](#):
>
> What is the db with watch history?

The database files you had from the last install.

---

<div class="post-metadata">

**Author:** ![dob312](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dob312](https://forums.plex.tv/u/dob312)\
**Post date:** [April 8, 2023, 12:36am UTC](https://forums.plex.tv/t/plex-crashing-overnight/836818/20 "2023-04-08T00:36:00Z")

</div>

Start/Stop feature not available

Select

1 - ‘stop’ - (Not available. Stop manually)

Any idea why I can’t stop ? Im running through unraid container terminal because that is the only way I know

[Next page](https://forums.plex.tv/t/plex-crashing-overnight/836818.md?page=2)
