Plex Server on Truenas stalls every night

Server Version#:1.23.3.4707
Player Version#: web
Truenas Server version: TrueNAS-12.0-U4
Running in a jail

Each night my Plex server stalls and must be restarted. The plugin status never says anything except “up”, so Truenas must not be detecting the fail. A simple restart and everything runs fine until the next morning. Any ideas?

I’m having zero luck figuring this out. Any ideas?

Here is what I’ve tried so far:

  1. Updated Truenas to 12.0 U4.1 - no change
  2. Updated Plex to 1.23.4.4805 - no change
  3. Turn off Truenas tasks: Cloudsync, SMART, Snapshot, Scrub, and turned off UPS service - no change

Here’s a Plex console log from the jail:
Sat Jul 17 11:29:20 CDT 2021

Stopping cron.
Waiting for PIDS: 95290.
.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg
32-bit compatibility ldconfig path: /usr/lib32
Starting dhclient.
Starting dhclient.
Starting dhclient.
Starting dhclient.
Starting dhclient.
Starting dhclient.
Starting Network: lo0 epair0b.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether a6:1f:72:7e:eb:bc
hwaddr 02:4d:aa:f2:c1:0b
inet 192.168.1.140 netmask 0xffffff00 broadcast 192.168.1.255
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T )
status: active
nd6 options=1
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp (X related).
Updating motd:.
Starting plexmediaserver.
Starting cron.

Unfortunately I have no idea. I’ve never had an issue like this before. But I’m also still running an older server version so it could potentially start happening for me too when I do decide to upgrade.

I linked to that other thread since your post reminded me of that topic with the nightly server dropping.

Tried another hypothesis: I installed a new Plex server in a new jail on the same disks as my primary storage. Still no luck. The new server stalled in the same manner and required a restart. Ack!

What does “stalls” mean?

It’s worth sharing the Plex logs here.

By “stall” I mean the weblink I use to access the front end returns a page that says “This site can’t be reached 192.168.1.140 refused to connect. Try: Checking the connection, Checking the proxy and the firewall ERR_CONNECTION_REFUSED”. The Truenas server plugin controller still says the server is “Up”, however.

Where (directory/path, folder, filename) will I find the log files that would be useful to diagnose this problem?

Thanks.

I noticed some clues on my Truenas console screen. “Out of Swap space”. See attached image. I have 8Gb RAM which seemed adequate. Is this my problem? How do I fix that? More RAM?

I checked my System>Advanced>Storage and found swap size set at 2gb and is unchangeable without destroying my pool. Is this the path I’d have to go down to fix it?

TrueNAS recommends a minimum of 8GB for basic operation, and more for any additional services (such as Plex).

That said, I’ve personally had good luck even with only 8GB.

Do you have other services, plugins, jails, enabled on the TrueNAS system?

Do you have DLNA enabled in Plex? In the past that was known to have several memory leaks.

My suspicion is that nightly processes such as Plex’s media analysis are encountering “bad” files, which can sometimes consume an unreasonable amount of memory.

You could temporarily disable those processes in Plex to see if it makes a difference.

SettingsLibrary
Generate video preview thumbnails
Generate intro video markers
Generate chapter thumbnails
Analyze audio tracks for loudness

SettingsScheduled Tasks
Upgrade media analysis during maintenance
Perform extensive media analysis during maintenance
Analyze and tag photos

I’m not suggesting that these features must be disabled for Plex to be reliable - mine works well with them enabled.

I’m suggesting that it might help identify what’s tripping things up.


Of course, sharing Plex log files here would also be valuable. Sometimes problematic media files can be identified that way.

Thanks. I’ve implemented the Plex process changes you mention. My Truenas load is fairly minor (a couple nightly Cloudsync tasks, Snapshot, Scrub, and SMART. One jail, One plugin (Plex). Services only SMB, UPS, and SMART. I’ve already tried deactivating most of that with no luck.

And attaching my Plex log files that I finally found.
Plex Media Server Logs_2021-07-23_16-51-40.zip (4.8 MB)

I deleted the old Plex server, plugin, and jail. And left the new one. And, last night it did not stall for the first time. Maybe the old plugin was the problem, and not the Swap file size? Possibly resolved.

I have been having this problem for 4 months since I have installed TrueNAS for the first time. It is a problem with the Swap Size under System >> Advanced >> Storage. I have increase the size to the maximum and the issue still occurs, but less frequently. I have not found a solution yet, but I am about to switch Unraid because this issue is annoying.

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