After a while of running plex Media server on my mac Studio plex scanner stuck in scanning. So i decide only manual scan, but even here plex server scanner will stuck after it run for several hours or days. When i transcode films it will be fast but after a while it slow extremly down and stuck. Watching films with streaming works perfect even if scanner and transcoding stuck. When i quit plex media server it will not quit i have to force it. I used process manager to quit all process. But the i can´t start plex media server again. I have to reboot the mac studio. After i reboot a message appears that osx not shutdown correctly. But i can start plex media server again.
This is my problems since 8 month and no update give me a solution
Hey @leleo731 I’m concerned about your Plex Server.
What have you learned since you posted?
If it’s still happening, are you still on 1.29.1.6276?
If this is unresolved, we can have you setup debug mode, restart the mac, demonstrate the issue, then grab server logs to investigate. I have a bunch of questions if so, like what steps it takes to get to where you say “plex scanner stuck in scanning.” I want to try to reproduce it.
Hi nibbles. Thx for your answer. I used always the newest version. It is 1.30.0.6359. I think it is a memory leak. i will try to send you the server protocol
I have another thought. I used smb to my nas where all the films are stored. I saw plex server opend a lot of files while plex server is scanning. When it stucked i try to closed it on my synology nas. but it will reopend immediaetly the files. The server is streaming files on clients without problems when the scanner or transcoder stucked. But i can´t quit server normaly anymore. I have to force to quit a reboot took a long time with a message from apple that the system not shutdown correctly.
Hmm. I looked at one of your logs and saw it had problems with a file. I can’t tell if that’s what led to your issue. The invalid data message below is saying it found garbage so to speak.
ron.laeuft.schief.german.dl.1080p.bluray.x264-kinowelt.mkv"
Nov 12, 2022 16:47:22.668 [0x16df63000] ERROR - [Req#ff5ef/Transcode/629c543b8429affcbf833017a01282fea4d84b3e/daf61fe6-c63a-4b8b-a40c-9360f8880e95] [dca @ 0x153705860] Failed to decode block code(s)
Nov 12, 2022 16:47:22.668 [0x16dd33000] ERROR - [Req#ff5fd/Transcode/629c543b8429affcbf833017a01282fea4d84b3e/daf61fe6-c63a-4b8b-a40c-9360f8880e95] Error while decoding stream #0:2: Invalid data found when processing input
You might try replacing that to start with.
I see also a lot of SLOW Queries which means the database isn’t optimized.
Is that being done as a scheduled task?
I’ll continue looking but it’s time for a nap now. I just wanted to say I’ve been reading.
I do it manually every 2-3 Weeks. But this isn´t the problems. I can´t cancel library scan anymore i have to force it over process manager. After that i can restart plex server but it doesn´t function. i can´t opened it and i have to restart osx. After a full restart i can start plex server again and it works for 2-3 Library scans. Playing over plex clients even if it stucks work properly.
Thank you for taking the time to explain it again carefully. Allow me to ask a few more questions so I understand which part of PMS is involved.
When you do a Scan Library Files and you say “plex server scanner will stuck after it run for several hours or days.” I need to know what it is doing. Tell me if this is correct
You add some movies and tv shows.
You do a manual Scan Library Files.
It is busy for hours or sometimes days.
Sometimes it crashes/hangs and breaks macos from what you can tell.
You have a movies and a tv shows library for example. Each library has Advanced settings.
in Settings → Libraries → mouseover a library → Edit Library → Advanced
Does Movies have
Enable Video Preview Thumbnails
Does TV Shows have
Enable Video Preview Thumbnails
Enable Intro Detection
Screenshot your PMS Settings → Library please.
Some things to help you understand how this happens to you.
PMS is not one app. It’s up to twelve at the moment. You can list them.
ls "/Applications/Plex Media Server.app/Contents/MacOS"
Usually several are running.
Only when you choose the PMS Quit do they all exit gracefully.
When Plex Media Scanner gets to a bad file, it can crash or hang. See the last (*).
On a modern compter, when a process hangs, it can get stuck consuming most of the CPU.
All of the above means that when you start PMS again it might not run well.
But after a reboot, it runs normally…
until you scan a bad file or try to transcode a bad file for thumbs or for VPTs or do Intro detection, and we start this whole thing again.
Does that make sense?
Understood, and I know what being stuck on a problem in computers is like. Because your Mac Studio is so good, and because PMS runs well on it, the duration suggests you collected a file or two it doesn’t like. We should be able to locate it with some diligence.
EDIT: It’s also highly possible that force quitting has left the database in a strange state that’s not being flagged as corrupt but is not really healthy as evidenced by the slow responses. ChuckPA and I are finishing his script for checking and repairing a db. I just ported it to PMS for Mac. We should find the problematic videos first though.
I don´t think it is one corrupt file. It stucks on different files. Today it happen again. All screenshot i send you it was stuck. But Plex Server is reachable and i can stream files without problems, but no library scanning is possible until i restart the mac studio and start plex server again. plex-pics.zip (13.3 MB)
Your question my answer for
The scan sometimes works it only for 10 or 20 Minutes in my large library film. There are over 7000 films inside. It stucks sometimes after 2 or 3 manually scans in different library. I will explain you. I scan the first library “films” without problems, then the second and the third library scan (this maybe a small one) it will stuck. Sometime it will stuck in the first big library after rebooting fresh osx. So i decide only scan manually. You will see the screenshot with process manager there is no much cpu process for scanning library. It never breaks macos, but after it stuck macos quit or shutdown will take a long time. It is shorter, when i use process manager and kill all plex processes and restart then. After the restart macos say it will not shutdown correctly and shot me that kernel 1 or 0 was panic.
Video preview thumbnail is setting on and trailer is on. I didn´t find intro detection in german language.
I’m going to give this some careful reading from top to bottom later today, but I wanted to say hello again.
a windows note: lockups on Windows machines at the OS level were an indication of driver issues. The OS might panic. However when a person would get harder crashes, restarts, lockups, those were at a lower level, the hardware level, cause often by RAM or a faulty power supply or faulty video card.
I’m not saying what could apply here. But I just wanted to mention those distinctions until I get back to read your attachments.
You might run Diagnostics on your Studio and reach out to Apple and ask if they can see any issues, in their inspection of your machine they can do remotely. (free as so new)
Would anyone be able to assist on this topic where a scan causes a lockup, but the lockup doesn’t always happen in the same library. While I couldn’t spot anything at all in the logs, that’s not uncommon. But the level of hang where MacOS is affected, and the non-repeatable nature makes it hard to know if I’m even looking in the right place.
Came back to Unix huh? I realized this topic is similar to another one ChuckPA just started helping with. While that one manifested near Remote Access and crashes, Chuck saw a lot of scanning. Normally I figure scanner problems are the encode, but I’ll add a link to the topic here.
As an aside, I thought crash logs would be easier to locate, but I’ve only seen @sa2000 ask for them. So I figure I don’t understand the conditions.
On my M1, I only do manual scans of media attached directly to the TB4 ports.
Are you using a thunderbolt bridge? I see 1 is detected by PMS. I was helping another user that had this configuration and PMS would not work well. Any interruptions in the network connection of the ethernet port would cause PMS to switch over to the bridge’s network, since that just appears as another IP address. Of course that doesn’t work right. If the bridge is how you are accessing your media, this isn’t going to work well.
If you don’t use the bridge connection try disabling it. That should help.
I have change my SMB.conf on the synology. I insert the fruit extension. Now it is fast and little bit reliable to osx. I can scan now the whole library after a restart of osx without stucking. But after two or three days it will stuck again and i have to restart with the same failure structure i told you above. In my opinion it is a memory leak problem with M1 Ultra. I can´t quit plex in normal way. The streaming works even when the library scan stucks.