# Plex service stops inside jail

**URL:** <https://forums.plex.tv/t/plex-service-stops-inside-jail/716099>\
**Category:** Plex Media Server\
**Tags:** server-freebsd, server-truenas\
**Created:** [May 16, 2021, 9:49am UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099 "2021-05-16T09:49:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrpopo666](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mrpopo666](https://forums.plex.tv/u/mrpopo666)\
**Post date:** [May 16, 2021, 9:49am UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/1 "2021-05-16T09:49:06Z")

</div>

Server Version#: 1.22.3.4523  
Player Version#: Latest Android, Android TV and Windows

I can see [somone else](https://forums.plex.tv/t/plex-media-server-stop-daily-freenas-jail-still-running/327912) has had this issue, and i’m not also struggling with it.  
Plex is set up inside a bsd jail and works really well. When it works. Randomly the service inside the jail just stops. When I manually start it again, it works again without issue. The logs don’t show any particular error either.

---

<div class="post-metadata">

**Author:** ![mikec\_pt](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikec_pt/32/4651_2.png) [@mikec\_pt](https://forums.plex.tv/u/mikec_pt)\
**Post date:** [May 16, 2021, 10:15am UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/2 "2021-05-16T10:15:10Z")

</div>

You have to provide a but more details in order to figure what’s happening. . .

Is it stopping or crashing?

Do you see any crash or kill do to OOM perhaps?

Looks at dmesg and if possible upload [PMS log](https://support.plex.tv/articles/200250417-plex-media-server-log-files/)s, although dmesg will probably have an hint as to how it’s dying.

The other post like this is very generic they might not be related at all. It also seems to have gone unnoticed likely because it was very generic.

I happen to noticed this one so perhaps if you provide a bit more info we will be able to help

---

<div class="post-metadata">

**Author:** ![mrpopo666](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mrpopo666](https://forums.plex.tv/u/mrpopo666)\
**Post date:** [May 16, 2021, 11:21am UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/3 "2021-05-16T11:21:47Z")

</div>

[Plex Media Server Logs\_2021-05-16\_02-38-40.zip](https://forums.plex.tv/uploads/short-url/3gxV0yRH6SZBnNvBTCg85RSEHLG.zip) (1.4 MB)

![image](https://global.discourse-cdn.com/plex/original/3X/f/4/f48ed97f6526bbe27229e3ce7ac169b9a8b21a79.png)

I think i’ve found something…

I’m going to track down this swap issue and will report back soon. Thanks for reminding me of dmesg!

---

<div class="post-metadata">

**Author:** ![mikec\_pt](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikec_pt/32/4651_2.png) [@mikec\_pt](https://forums.plex.tv/u/mikec_pt)\
**Post date:** [May 16, 2021, 12:51pm UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/4 "2021-05-16T12:51:32Z")

</div>

So it is OOM, the process is killed cause you are running out of memory.

If your using freenas/truenas you probably have ZFS, you might need to limit the “arc” memory size,not sure if they change it,but by default it will be set to almost all your RAM,which doesn’t leave much for user processes.

Ofc limiting that affects ZFS performance, depends on how much RAM you actually have.

---

<div class="post-metadata">

**Author:** ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)\
**Post date:** [May 16, 2021, 4:58pm UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/5 "2021-05-16T16:58:24Z")

</div>

You should probably reboot after this happens, since **smbd** and **collectd** were also killed.

The **Plex Media Scanner Deep Analysis.log** s make me wonder if Plex is trying to analyze “broken” music files. (Maybe it doesn’t like _One Direction_, haha.)

My first step would be to track down which process is using up all of the memory. Plex doesn’t _normally_ need a ton of RAM. But if something is using ALL of the system RAM, everything will be impacted.

I have fine luck on one 8GB TrueNAS box, running multiple other jails. There’s just a few GB for services, and everybody gets along.

![image](https://global.discourse-cdn.com/plex/original/3X/f/4/f438d25192b88090bf7b7408879ae1ce0565e632.png)

---

<div class="post-metadata">

**Author:** ![mrpopo666](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mrpopo666](https://forums.plex.tv/u/mrpopo666)\
**Post date:** [May 16, 2021, 5:06pm UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/6 "2021-05-16T17:06:36Z")

</div>

I’m already using this box as a NAS and PLEX service only. It has 16Gigs.  
I did remove the virtual machines from this box because I saw they were eating some RAM. I’ll report back after some stability testing

---

<div class="post-metadata">

**Author:** ![mrpopo666](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mrpopo666](https://forums.plex.tv/u/mrpopo666)\
**Post date:** [May 20, 2021, 12:59pm UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/7 "2021-05-20T12:59:31Z")

</div>

So, i’ve made a thread on the Truenas forums.  
Follow it here:

> **[Plex service stopping inside jail](https://www.truenas.com/community/threads/plex-service-stopping-inside-jail.93243/)**
>
> I can see a handfull of people are (or were) having issues with the plex service stopping inside the bsd jail. As am I.
> 
> I'm running the lastest truenas, with a manually created jail and installed the plex server. It works really well but randomly...

---

<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:** [August 18, 2021, 12:59pm UTC](https://forums.plex.tv/t/plex-service-stops-inside-jail/716099/8 "2021-08-18T12:59:33Z")

</div>

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