Why is Library scan stuck in endless process?

Since NO ONE from Plex Dev team has EVER responded to my previous postings requesting support, I expect nothing more here either, but maybe other users are seeing the same problem and might be able to input as well.

EVERY single time the plex server starts a library scan, it completes TV section and 3D sections without issue, but once it hits the movies section it adds new content without obvious issue, but then gets stuck in a seemingly endless scan and never stops or completes even after days. If I cancel the scan, clean bundles, optimize database and empty trash, it still gets stuck. The movies section shown on the left of the web interface constantly shows a scan in progress. The logs show NO activity whatsoever during this process. If I cancel and then restart the scan, the logs show activity until the movie section is accessed and then (after adding any new content) shows NO progress. I have let it go for days even an entire week without any interruption and still no progress or completion shown in the logs.

I Would really appreciate some inout from PLEX Staff. I have both logs and database zipped up for submittal, but unless I can get a response from someone who can actually help, this whole thing is a wash!

Seriously Frustrated with NO support from PLEX.

2 Likes

If you have logs then post them please. it only happens on movie library it is probably stuck on a corrupted file but need logs

I resolved it… One of my videos was apparently corrupt, as someone suggested. Once it was removed the endless scan was fixed.

how did you find out which movie was corrupt?

1 Like

@richstanley said:
how did you find out which movie was corrupt?

I would guess it is in the logs, so check with logs and delete movie.

Server stuck in Movies-Scan too. Other sections pass easily.

I found logs but don’t know how to read them to find a potential corrupt file.

com.plexapp.agents.htbackdrops.log.5
com.plexapp.agents.imdb.log
com.plexapp.agents.imdb.log.1
com.plexapp.agents.imdb.log.2
com.plexapp.agents.imdb.log.3
com.plexapp.agents.imdb.log.4
com.plexapp.agents.imdb.log.5
com.plexapp.agents.lastfm.log
com.plexapp.agents.lastfm.log.1
com.plexapp.agents.lastfm.log.2
com.plexapp.agents.lastfm.log.3
com.plexapp.agents.lastfm.log.4
com.plexapp.agents.lastfm.log.5
com.plexapp.agents.localmedia.log
com.plexapp.agents.localmedia.log.1
com.plexapp.agents.localmedia.log.2
com.plexapp.agents.localmedia.log.3
com.plexapp.agents.localmedia.log.4
com.plexapp.agents.localmedia.log.5
com.plexapp.agents.lyricfind.log
com.plexapp.agents.lyricfind.log.1
com.plexapp.agents.lyricfind.log.2
com.plexapp.agents.lyricfind.log.3
com.plexapp.agents.lyricfind.log.4
com.plexapp.agents.lyricfind.log.5
com.plexapp.agents.movieposterdb.log
com.plexapp.agents.movieposterdb.log.1
com.plexapp.agents.movieposterdb.log.2
com.plexapp.agents.movieposterdb.log.3
com.plexapp.agents.movieposterdb.log.4
com.plexapp.agents.movieposterdb.log.5
com.plexapp.agents.none.log
com.plexapp.agents.none.log.1
com.plexapp.agents.none.log.2
com.plexapp.agents.none.log.3
com.plexapp.agents.none.log.4
com.plexapp.agents.none.log.5
com.plexapp.agents.opensubtitles.log
com.plexapp.agents.opensubtitles.log.1
com.plexapp.agents.opensubtitles.log.2
com.plexapp.agents.opensubtitles.log.3
com.plexapp.agents.opensubtitles.log.4
com.plexapp.agents.opensubtitles.log.5
com.plexapp.agents.plexmusic.log
com.plexapp.agents.plexmusic.log.1
com.plexapp.agents.plexmusic.log.2
com.plexapp.agents.plexmusic.log.3
com.plexapp.agents.plexmusic.log.4
com.plexapp.agents.plexmusic.log.5
com.plexapp.agents.plexthememusic.log
com.plexapp.agents.plexthememusic.log.1
com.plexapp.agents.plexthememusic.log.2
com.plexapp.agents.plexthememusic.log.3
com.plexapp.agents.plexthememusic.log.4
com.plexapp.agents.plexthememusic.log.5
com.plexapp.agents.themoviedb.log
com.plexapp.agents.themoviedb.log.1
com.plexapp.agents.themoviedb.log.2
com.plexapp.agents.themoviedb.log.3
com.plexapp.agents.themoviedb.log.4
com.plexapp.agents.themoviedb.log.5
com.plexapp.agents.thetvdb.log
com.plexapp.agents.thetvdb.log.1
com.plexapp.agents.thetvdb.log.2
com.plexapp.agents.thetvdb.log.3
com.plexapp.agents.thetvdb.log.4
com.plexapp.agents.thetvdb.log.5
com.plexapp.system.log
com.plexapp.system.log.1
com.plexapp.system.log.2
com.plexapp.system.log.3
com.plexapp.system.log.4
com.plexapp.system.log.5
Plex Crash Uploader.1.log
Plex Crash Uploader.2.log
Plex Crash Uploader.3.log
Plex Crash Uploader.log
Plex Media Scanner Analysis.1.log
Plex Media Scanner Analysis.2.log
Plex Media Scanner Analysis.3.log
Plex Media Scanner Analysis.4.log
Plex Media Scanner Analysis.5.log
Plex Media Scanner Analysis.log
Plex Media Scanner Chapter Thumbnails.1.log
Plex Media Scanner Chapter Thumbnails.2.log
Plex Media Scanner Chapter Thumbnails.3.log
Plex Media Scanner Chapter Thumbnails.4.log
Plex Media Scanner Chapter Thumbnails.5.log
Plex Media Scanner Chapter Thumbnails.log
Plex Media Scanner Deep Analysis.1.log
Plex Media Scanner Deep Analysis.2.log
Plex Media Scanner Deep Analysis.3.log
Plex Media Scanner Deep Analysis.4.log
Plex Media Scanner Deep Analysis.5.log
Plex Media Scanner Deep Analysis.log
Plex Media Scanner.1.log
Plex Media Scanner.2.log
Plex Media Scanner.3.log
Plex Media Scanner.4.log
Plex Media Scanner.5.log
Plex Media Scanner.log
Plex Media Server.1.log
Plex Media Server.2.log
Plex Media Server.3.log
Plex Media Server.4.log
Plex Media Server.5.log
Plex Media Server.log
Plex Transcoder Statistics.1.log
Plex Transcoder Statistics.2.log
Plex Transcoder Statistics.3.log
Plex Transcoder Statistics.4.log
Plex Transcoder Statistics.5.log
Plex Transcoder Statistics.log
Plex Tuner Service.1.log
Plex Tuner Service.2.log
Plex Tuner Service.3.log
Plex Tuner Service.4.log
Plex Tuner Service.5.log
Plex Tuner Service.log

@richstanley said:
how did you find out which movie was corrupt?

I kept watching the status messages and notice a particular movie title kept showing up. so I just deleted that title and that fixed it.

I am having this same issue, but with a music library. I do have a huge library, with about 250k files. However, I have a big NAS with SSD’s in RAID, so it should handle it, and had been until recently when I added more content. I looked for a corrupt file name in the logs that kept coming up (per above posts), but didn’t see one. I need help in finding it, or figuring it out. Recreating a library of this size is not an option. Appreciate any feedback.

2 Likes

From plex top menu bar use activity when Plex is running a Scan

This is still an issue. My server is getting stuck in the music library, and citing a value in the activity dashboard that I don’t know if its a song, album or artist. and there are over a dozen matches given I don’t know which it is: should I delete them all? The laundry list of logs to check seems rather daunting, but I guess that’s the next step. Too bad Plex scan doesn’t have a timeout feature to avoid such resource stealing bugs. Oh ya, this is consuming exactly half (every other core) on my server.

1 Like

My server recently stopped picking up new content, and dozens of shows are processing over and over again in an endless loop. Anyone figure out how to determine the culprit, and why plex doesn’t detect that it is doing this and flag the problem file for bypassing.

1 Like

Same here, stuck in endless loop in my music library. I removed the files that are shown in the activity dashboard. The scan just gets stuck at a different file/folder.

Any ideas on resolving this issue

1 Like

me too, scanner is getting stuck with music library, please fix.

Hello,

I am also having this same problem with my Movies library. I have tried all the basic stuff. Re-install PMS. Re-install macOS. Restart NAS device. Nothing seems to work.

It will scan my TV Shows library fine. But when the Movies scan starts, nothing happens at all. It says it’s ā€œScanning Moviesā€ but it never starts scanning and effectively crashes PMS. I can’t cancel the scan and it won’t let me quite PMS. Nothing can be played. I have to force quit the app. Then it won’t let me restart the app. I get an error popup saying ā€œThe application Plex Media Server is not open anymoreā€. I have to restart the Mac to get PMS going again.

I have all the logs turned on and have had a peek but I’m not sure what I’m looking for.

The content is served from a Qnap NAS device. I also run PMS on the NAS directly as a backup server. Referencing the same media library of Movies and TV Shows, this PMS works flawlessly. It has no problems scanning either library so I don’t think I’m dealing with a corrupt file here in my case as surely that would effect both PMS’s.

At a bit of a loss and would really appreciate some help. I can provide logs etc. Just tell me which logs you need and I will post them for review.

I can’t remember exactly when this issue started to occur but it was sometime before Christmas. Potentially around the latest macOS update but I can’t be certain. I don’t know if this is an issue with PMS or macOS?

I’ve considered the possibility that it could be a corrupt database as I have had that before in the past, but not with this symptom. I don’t want to dump the database if I can help it. Surely though if the database was corrupt the scanning of the TV Shows would fail as well as it’s all contained in the same database?

Thanks in advance.

Damien

I would be checking the scanner logs for an error.

Turn debug logging, restart Plex media server. Scan movie Library.

Go to troubleshooting after activating scan and it is stuck.

Remove offending File and do scan again.

I restored from database from a backup in November. Scanned the Movies to pull in the changes since then. The scan ran fine and updated. But after that when it tries to run a scan of the Movies, again it fails.

I already had debug logging turned on as well verbose logging. I’ve downloaded and reviewed the logs. As far as I can tell, it crashes upon starting the Movies scan. The last entries in the scanner log were from the evening of the 19 Jan as were as follows:

Jan 19, 2020 22:20:46.900 [0x10940edc0] DEBUG - Scanning Movies using en(Plex Movie Scanner) with 1881 current media items and 1 section locations in the database…
Jan 19, 2020 22:20:47.007 [0x10940edc0] DEBUG - Performing a scan with ā€˜Plex Movie Scanner’ (language: en virtual: 0).
Jan 19, 2020 22:20:47.007 [0x10940edc0] DEBUG - * Scanning /Volumes/Multimedia/Movies

That’s it. And it been running the scan ever since then. I have attached all the logs that were downloaded.

Any help or advice would be greatly appreciated.

com.plexapp.agents.fanarttv.log (12.3 KB) com.plexapp.agents.htbackdrops.log (7.4 KB) com.plexapp.agents.imdb.log (6.1 KB) com.plexapp.agents.lastfm.log (7.7 KB) com.plexapp.agents.localmedia.log (270.7 KB) com.plexapp.agents.lyricfind.log (5.2 KB) com.plexapp.agents.movieposterdb.log (5.0 KB) com.plexapp.agents.none.log (14.9 KB) com.plexapp.agents.opensubtitles.log (6.9 KB) com.plexapp.agents.plexmusic.log (7.9 KB) com.plexapp.agents.plexthememusic.log (9.7 KB) com.plexapp.agents.thetvdb.log (54.8 KB) com.plexapp.system.log (898.6 KB) org.musicbrainz.agents.music.log (7.3 KB) Plex Crash Uploader.1.log (630 Bytes) Plex Crash Uploader.2.log (2.7 KB) Plex Crash Uploader.3.log (2.3 KB) Plex Crash Uploader.4.log (1.9 KB) Plex Crash Uploader.5.log (1.5 KB) Plex Crash Uploader.log (630 Bytes) Plex Media Scanner Analysis.1.log (9.2 KB) Plex Media Scanner Analysis.2.log (9.2 KB) Plex Media Scanner Analysis.3.log (9.2 KB) Plex Media Scanner Analysis.4.log (9.2 KB) Plex Media Scanner Analysis.5.log (9.2 KB) Plex Media Scanner Analysis.log (4.2 KB) Plex Media Scanner Chapter Thumbnails.1.log (20.9 KB) Plex Media Scanner Chapter Thumbnails.4.log (18.4 KB) Plex Media Scanner Chapter Thumbnails.5.log (20.9 KB) Plex Media Scanner Chapter Thumbnails.log (20.9 KB) Plex Media Scanner Deep Analysis.1.log (3.9 KB) Plex Media Scanner Deep Analysis.2.log (3.9 KB) Plex Media Scanner Deep Analysis.3.log (3.9 KB) Plex Media Scanner Deep Analysis.4.log (4.5 KB) Plex Media Scanner Deep Analysis.5.log (4.5 KB) Plex Media Scanner Deep Analysis.log (3.9 KB) Uploading: Plex Media Scanner.1.log… Uploading: Plex Media Scanner.2.log… Uploading: Plex Media Scanner.3.log… Uploading: Plex Media Scanner.4.log… Uploading: Plex Media Scanner.5.log… Plex Media Scanner.log (4.5 KB) Uploading: Plex Media Server.1.log… Uploading: Plex Media Server.2.log… Uploading: Plex Media Server.3.log… Uploading: Plex Media Server.4.log… Uploading: Plex Media Server.5.log… Uploading: Plex Media Server.log… Plex Transcoder Statistics.1.log (2.1 KB) Plex Transcoder Statistics.2.log (10.8 KB) Plex Transcoder Statistics.4.log (10.6 KB) Plex Transcoder Statistics.5.log (5.4 KB) Plex Transcoder Statistics.log (8.5 KB) Plex Tuner Service.1.log (3.1 KB) Plex Tuner Service.2.log (3.1 KB) Plex Tuner Service.3.log (3.1 KB) Plex Tuner Service.4.log (3.1 KB) Plex Tuner Service.5.log (3.1 KB) Plex Tuner Service.log (2.3 KB)

Update:

macOS 10.15.2 was the problem. There is clearly a bug with SMB.

Updating to 10.15.3 public beta 3 has fixed everything.

1 Like

Well, I have a Mac running as a server publishing pretty much ONLY Music Libraries. All of my other content is on a CentOS 7 linux server but the Music library was taking too long to scan there and preventing other content from getting detected. On the Mac I have two items in the Library, an iTunes connector and a NFS mounted directory from the linux machine (which is an iscsi volume). I expect that all told there are about 200K tracks.

The scanner on the Mac works for a while and then posts the following in the logs:
Feb 01, 2020 10:14:25.264 [0x700006330000] ERROR - Unknown metadata type: folder
Feb 01, 2020 10:14:30.756 [0x70000707e000] ERROR - Unknown metadata type: folder
Feb 01, 2020 10:15:02.567 [0x7000055e2000] ERROR - Resources:CPUUtilization: Unexpected result when getting usage for pid 28944
Feb 01, 2020 10:15:02.567 [0x7000055e2000] ERROR - Resources:MemoryUsage: Unexpected result when getting usage for pid 28944
Feb 01, 2020 10:15:02.797 [0x700006ffb000] ERROR - Unknown metadata type: folder

The only recovery is to killall ā€œPlex Media Serverā€. I’ve got sysctl setup to restart the server so all I need to do is kill. So far, it has scanned 50K tracks and gets about 2K more each time I kill the server. I would love to make it more stable.

One thing about this server is that it is a Mac Pro with an Apple RAID card as a boot volume so I’m stuck at macOS 10.12.6 (16G2136). Any deas?