PMS Scanner Always Running

Server Version#: 1.32.0.6918

Looking at the logs it appears that Plex thinks that nearly all of my media has changed, all the time, therefore the scanner is constantly running. It then continually uses more and more RAM and VRAM until the server is unresponsive. Trying to figure out why Plex thinks my media has changed. Help would be appreciated. Logs attached.

Here is an example
Apr 09, 2023 10:50:01.601 [0x7f9c7b86ab38] INFO - Library section 1 (Movies) will be updated because of a change in “/storage/multimedia/movies/Jurassic Park III (2001)”

and between these messages, I find these that I am not sure what they mean or if they are related

Apr 09, 2023 10:55:06.686 [0x7f9c75845b38] WARN - MyPlex: Invalid response when mapping state (code=429):
Plex Media Server Logs_2023-04-09_12-45-31.zip (3.5 MB)

Do you have a cron job that changes permissions?

1 Like

Flippin’ genius. Yes. I guess I should get serious about my group/user configuration instead of relying on my cron job. Thanks.

There is something around the forum from ChuckPa about this. I am betting you are using a sledge hammer approach and resetting ALL permissions for ALL files ever X, Let me see if I can find that post, but it would look for files that need fixed, and then just update those.

1 Like

Yes, yes and yes
I am changing all files whether they need it or not.

Awesome, thanks.

Future ref to all who find this:

Now listed in

1 Like

To close the loop on this. I was using a sledgehammer approach to fixing my permissions as seen here.


These jobs were running every 5 minutes.

I then turned off those jobs and created a SABnzbd post processing script that runs only on the directory for which new content is downloaded with the following. (I haven’t fully tested the script, but it’s based off of many examples found online including the one @ChuckPa posted above.) Simply put a file ending in .sh (mine is permissionpostprocess.sh), place it in a folder, be sure to change it to an executable file (sudo chmod +x /yourpath/yourscript.sh) then in SABnzbd go to Config > Folders > Scripts Folder and enter the path to your script. You may need to restart SABnzbd, but that’s it.

#!/bin/sh

find $1 -type d ! -perm 0775 -exec chmod -R 775 {} ;
find $1 -type d -exec chown -R debian-transmission:media {} ;
(Change the user and group to your own)

My server is no longer constantly scanning the files and my memory and crashing issue is gone. Thanks for your insight @dbirch and @ChuckPa.

@DancherBoi

May I suggest ?

Put quotes around "$1"

find "$1" -type d ! -perm 0775 -exec chmod -R 775 {} \;
find "$1" -type d -exec chown -R debian-transmission:media {} \;

This way, if you get something with a space in the name, it won’t blow up

I had set that originally, but when I ran in console it didn’t recognize. I guess in the script it will. Thanks, I have updated my script. Let’s see what happens.

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