Player Version#: 4.133.0
Truenas Core.
2 8tb drives with all media loaded.
2 4tb drives for back ups.
2 16tb drives to back up all truenas
I had to reinstall my plex server as I swapped to larger drives.
Followed all the steps and my media dump into it has populated.
But anything I add to the media drive, that is listed as a library, isn’t being scanned.
In fact the scan button is almost only a blink. not really scanning.
Please help as this headache I thought would have been alot easier to figure out.
Added-
I have stopped the plex jail and restarted no change. I also restarted my Truenas system.
i had same issue for different reasons, it would scan but not add the media, i had to add it manually
Double check your mount points and permissions (ACL).
This is not a mount point issue. This is a Plex Media Server issue (v 4.134.2). Selecting “Scan Library Files” for the Library does nothing. There isn’t even a hesitation by the server. No scanning is done by the server even at scheduled times.
Yes, I also have issues with the scanner since updating. I constantly have to restart PMS for the scanner to start working again. Looks like all those layoffs are doing wonders. Substantially less updates and the ones that do come out are low quality and break things.
My Plex puked after the last update as well. Not seeing or adding new media. No refreshed metadata. Server has been running for years without many issues, have done nothing other than the last update. I run the other guys server solution as well and it is seeing / updating / adding items correctly.
Just a follow up, I installed Starlink the same day as i did the plex update. PLEX is not grabbing metadata due to the starlink connection. If i turn on my VPN PLEX will acquire the metadata.
So my issues are for a different issue.
Just wanted to follow up because this is still occurring for me. The scanner service will lock up on automated scans. I can tell it is broken because if I open the web client or Plex desktop app, I can see it spinning in the status bar infinitly stuck on one file. I got some errors in the logs:
Aug 19, 2024 01:08:11.205 [140591914229504] ERROR - Exception analyzing media file ‘/vivalarev/PlexDirs/Requested/AutoDL/Movies/A Quiet Place Day One (2024)/A Quiet Place Day One (2024).mp4’ (Could not parse /vivalarev/PlexDirs/Requested/AutoDL/Movies/A Quiet Place Day One (2024)/A Quiet Place Day One (2024).mp4 (error=-2): No such file or directory)
Aug 19, 2024 01:08:11.205 [140591914229504] ERROR - Failed to successfully analyze part 24124.
Aug 20, 2024 07:09:49.396 [140591024459520] ERROR - [FFMPEG] - mmco: unref short failure
…
Aug 20, 2024 07:09:49.437 [140591024459520] ERROR - [MI] Read to end of file without finding a keyframe
…
Aug 14, 2024 08:26:37.389 [140031515086592] ERROR - BufferingLineReader: failed to read line (error: -1)
…
Aug 20, 2024 21:37:48.292 [139785990327096] ERROR - Thread: Couldn’t add a new thread to the pool of size 17: thread constructor failed: Resource temporarily unavailable
Aug 20, 2024 21:37:48.292 [139785990327096] ERROR - Thread: Couldn’t add a new thread to the pool of size 17: thread constructor failed: Resource temporarily unavailable
Aug 20, 2024 21:37:48.292 [139785990327096] ERROR - Thread: Couldn’t add a new thread to the pool of size 17: thread constructor failed: Resource temporarily unavailable
Aug 20, 2024 21:37:48.293 [139785990327096] ERROR - Thread: Couldn’t add a new thread to the pool of size 17: thread constructor failed: Resource temporarily unavailable
Aug 20, 2024 21:37:48.293 [139785990327096] ERROR - Thread: Couldn’t add a new thread to the pool of size 17: thread constructor failed: Resource temporarily unavailable
Aug 20, 2024 21:37:48.293 [139785990327096] ERROR - Thread: Couldn’t add a new thread to the pool of size 17: thread constructor failed: Resource temporarily unavailable
It seems to me like maybe there is a memory leak or infinite looping issue that is causing the Plex scanner to use up all available resources in some capacity (maybe # of open files, memory, etc set by ulimit).
Anyone having this issue, lets start with a copy of your server logs. for @Retalak I suspect it may be a permissions issue and that recursive permissions wasnt set correctly.
Plex Media Server Logs_2024-08-20_21-42-15.zip (5.6 MB)
It’s important to note that, following these PMS errors, a lot of other docker based applications start erroring out with similar “Resource temporarily unavailable” and “System.OutOfMemoryException” error messages. So far I have seen similar errors in:
Sonarr
Radarr
Prowlarr
Qbittorent
And noticed program hangs in:
Flaresolverr
Overseerr
But they all follow the initial errors in the PMS logs.
What is your RAM allocation? the logs read like it is running out of memory. What is your RAM usage (if you are using docker check those settings too)
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 1546829
max locked memory (kbytes, -l) 49513024
max memory size (kbytes, -m) 4194304
open files (-n) 100000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1500
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Unfortunately this is a shared rented machine so I don’t think I can check the docker stats. I tried docker stats but got permission denied. But overall RAM usage stats based on readings from Plex was only 25% before I restarted everything.
Since you are on a rented shared machine I would reach out to whomever supports it and ask for troubleshooting, odds are since its a shared server it probably has memory quotas in place.
I believe it turned out to be something with Tautulli and Python using up too many threads. I shut it down for a few weeks and didn’t have an issue. Just did a fresh install of Tautulli and I’m going to see how it does.
Okay so I have resolved the memory issues (Tautulli and FlareSolverr memory leaks) but I am still getting resource temporarily unavailable errors in Plex ONLY, and the server no longer detects new media even if manually scanned as described in this thread, until I restart PMS. My issue seems like it may be related to this thread. I have noticed the problem has occurred just after 4am twice in a row now (the 27th and 29th), and there are dozens of requests from Overseerr at the same time. From the logs, it seems the server is also scanning libraries, detecting intros, detecting voice activity, generating video preview thumbnails, and updating metadata around the same time.
I think the issue might be the transcoder. I created this script:
#!/bin/bash
#Checks count of running processes (in total # of threads) and sends alerts if it reaches above a certain count
#Vars
countThreshold=900
homeDir='/home/USER/'
logFile="/home/USER/Scripts/Logs/ProcessChecker/ProcessChecker.log"
errorStatus=false
# Get current count of running threads
currentCount=$(ps -L -u USER | wc -l)
# if currentCount is higher than countThreshold, log and send alert
if [ $currentCount -gt $countThreshold ];
then
currentList=$(ps -L -u USER)
echo "######################################################################################################################################" >> $logFile
echo "$currentCount processes active as of $(date)" >> $logFile
echo "$currentList" >> $logFile
# Code to send email removed for security purposes
#curl -X POST ...
else
exit
fi
echo "" >> $logFile
My normal process count sits around 600 for everything running on this machine. I just received an email this evening from the script and checked the logs. There were 322 “Plex Transcoder” processes (threads) running at the time the script was triggered. Is this supposed to be normal behavior? That seems like an excessive amount of threads.
Looking at the logs, it seems like this occurred when a new piece of content was added. All of the different detection/generation processes ran against the new content resulted in 322 transcoder threads. Nothing was being played at the time.
Ive seen a similar fork bomb issue on windows occasionally when the parent/child processes get disassociated. You might also try setting Maximum simultaneous video transcode
Interesting. Perhaps this is an issue that needs to be investigated by Plex staff. Does that setting limit the number of threads directly, or is it more abstracted and only limit active transcode streams? The wording in its description makes it sound more like the latter.
It seems like the transcoder in general just creates a lot of threads. I have one stream going that is transcoding the video only (audio direct stream), nothing else is running - no background processes or anything, and it has created 137 Plex Transcoder threads. There definitely needs to be a way to limit this somehow. 137 seems excessive for one stream, and this abundance of threads can cause serious issues on machines with software resource limits.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.