Mediaserver gets stuck during mediascan

Server Version#: Version 1.25.4.5487 on Debian 10
Player Version#: PlexApp for Windows Version 1.40.1.2823-6f60f3a7

The server is configured to automatically start scanning when files are added to the music-/audiobook-share.

The medialibrary is configured as follows:

Scanner 
Plex Music Scanner
Agent 
Personal Media Artists
Sichtbarkeit 
In der Startseite und Globaler Suche
Schränke ein, wo Inhalte dieser Mediathek erscheinen sollen.

Albumreihenfolge 
Nach Name
Reihenfolge der Alben eines Interpreten

 Sonic Analysis
Analyze tracks for sonic features.

 Bevorzuge lokale Metadaten
Beim Durchsuchen dieser Mediathek eingebettete Metatags und lokale Dateien bevorzugen (wenn vorhanden).

 Abspielposition speichern
Remember and resume from your previous listening position. Useful for libraries with long-form audio content.

 Inhalte aus geteilten Mediatheken einschließen
Zeige passende Empfehlungen und zusätzliche Alben aus fremden, mit dir geteilten Mediatheken. Ergänze „Artist-Radio“ mit geteilten Titeln.

 Künstlerbiographien
Lade Künstler-Biographien aus der Cloud.

 Albumsrezensionen und Kritikerbewertungen
Lade Albumsrezensionen und Bewertungen durch Kritiker aus der Cloud.

 Populäre Titel
Lade Daten zu allgemein populären Titel, die in „Radios“ und auf den Künstler-Seiten benutzt werden.

 Konzerte
Lade Konzerttermine von Künstlern.

Genres 
Eingebettete Metatags
Quelle für die Genre-Tags von Künstlern und Alben

Albumcover 
Nur lokale Dateien
Quelle für automatische Albumcover

When files are added, the server starts scanning and the spinner on the upper right of the PlayerApp doesn’t stop. When I click on it, it says “Scanning Hörbücher” and it does this for hours. Restarting the PlayerApp doesn’t fix it.

This issue arose since the last two server-updates.

Plex Media Server Logs_2022-02-02_16-48-48.zip (6.7 MB)

According to your log, it did finish?

Feb 02, 2022 00:28:27.386 [0x7f81de33eb38] DEBUG - Activity: updated activity 08918e13-73e3-46d5-ac6f-e9ff07bb583e - completed 100.0% - Scanning Hörbücher
Feb 02, 2022 00:28:27.386 [0x7f81de33eb38] DEBUG - Activity: Ended activity 08918e13-73e3-46d5-ac6f-e9ff07bb583e.
Feb 02, 2022 00:28:27.387 [0x7f81e08c7b38] DEBUG - Completed: [127.0.0.1:46404] 200 PUT /activities/08918e13-73e3-46d5-ac6f-e9ff07bb583e?percentComplete=100 (10 live) GZIP 1ms 195 bytes (pipelined: 2883)
Feb 02, 2022 00:28:27.466 [0x7f81e23e4b38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 28573 is 0 (success)

So are you using the bundled WebClient, or https://app.plex.tv/desktop/#!/

No. It didn’t. I cancelled the library-scan, then the albums i added in the meantime appeared in the “Recently Added” list. After one or two albums, it got stuck again. So I cancelled the scan and the next albums appeard.

Meanwhile I found out, that this issue doesn’t occur when adding TV-Shows or Movies.

I also have another server running in an LXC-container based on ArchLinux. It has Version 1.25.5.5492. Surprisingly this is running without issues so far.

For testing I removed a set of audiobooks from the media directory. I’ll let the server run over night and if there’s no change, I’ll gather another set of logs and upload them for you.

BTW I’m running the “Plex for Windows”-App Version 1.40.1.2823-6f60f3a7. It updated itself yesterday to this version. The OS is Windows 11.

I just tried opening the internal webserver with https://192.168.188.26:32400/web/index.html#!/ while the scanning process is running. The local server “Plexhome” (which has the issues) didn’t respond and I was transferred to the one in the LXC-container. The local one doesn’t show up in the server list. I can’t reach the local server from the outside because of a double-NAT on the LTE-Network I have to use. The LXC is running on a rootserver in a datacenter.

I logged into the Debian 10 host where “Plexhome” is running on, to check there:

root@debnas.fritz.box:/usr/lib/plexmediaserver# systemctl status plexmediaserver.service
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2022-02-01 11:19:28 CET; 1 day 11h ago
  Process: 28986 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
 Main PID: 28988 (PMS RunServer)
    Tasks: 117 (limit: 4915)
   Memory: 2.7G
   CGroup: /system.slice/plexmediaserver.service
           ├─  363 /usr/lib/plexmediaserver/Plex Media Scanner --analyze-loudness --section 13 --log-file-suffix  Deep Analysis
           ├─ 7354 /usr/lib/plexmediaserver/Plex Media Scanner --scan --refresh --section 13 --activity 8a07921a-3086-4f53-a779-fe178a539afb --directory /zfstoshiba/audiobook/Dorian Hunter/Folge 04- Das Wachsf
           ├─28988 /usr/lib/plexmediaserver/Plex Media Server
           ├─29072 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-648a8f9f9/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.4.5487-648a8f
           ├─29129 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.25.4.5487-648a8f9f9 32600
           ├─29239 Plex Plug-in [tv.plex.agents.movie] /usr/lib/plexmediaserver/Resources/Plug-ins-648a8f9f9/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.4.5487-648a
           ├─29386 Plex Plug-in [tv.plex.agents.music] /usr/lib/plexmediaserver/Resources/Plug-ins-648a8f9f9/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.4.5487-648a
           ├─29388 Plex Plug-in [tv.plex.agents.series] /usr/lib/plexmediaserver/Resources/Plug-ins-648a8f9f9/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.4.5487-648
           ├─30411 Plex Plug-in [com.plexapp.agents.none] /usr/lib/plexmediaserver/Resources/Plug-ins-648a8f9f9/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.4.5487-6
           └─30786 Plex Plug-in [com.plexapp.agents.localmedia] /usr/lib/plexmediaserver/Resources/Plug-ins-648a8f9f9/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.4.

Feb 02 20:50:51 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:52:21 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:53:52 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:55:51 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:55:51 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:55:54 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:55:54 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:56:32 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:56:32 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
Feb 02 20:56:37 debnas Plex Media Server[28988]: Unable to open: No such file or directory (2)
root@debnas.fritz.box:/usr/lib/plexmediaserver# ls -aliF
insgesamt 33928
5250534 drwxr-xr-x  5 root root     4096 Feb  1 11:19  ./
4718596 drwxr-xr-x 79 root root     4096 Nov 10 15:07  ../
5244013 -rwxr-xr-x  1 root root  1185848 Jan 31 21:29  CrashUploader*
5639209 drwxr-xr-x  2 root root     4096 Feb  1 11:19  etc/
5505588 drwxr-xr-x  3 root root    12288 Feb  1 11:19  lib/
5251992 -rwxr-xr-x  1 root root   270928 Jan 31 20:59 'Plex Commercial Skipper'*
5251990 -rwxr-xr-x  1 root root  3103104 Jan 31 21:26 'Plex DLNA Server'*
5244012 -rwxr-xr-x  1 root root   114000 Jan 31 20:59 'Plex Media Fingerprinter'*
5251993 -rwxr-xr-x  1 root root  4411912 Jan 31 21:30 'Plex Media Scanner'*
5251991 -rwxr-xr-x  1 root root 18774392 Jan 31 21:35 'Plex Media Server'*
5251994 -rwxr-xr-x  1 root root  3408864 Jan 31 20:59 'Plex Relay'*
5251995 -rwxr-xr-x  1 root root    10704 Jan 31 20:59 'Plex Script Host'*
5251989 -rwxr-xr-x  1 root root    10696 Jan 31 20:59 'Plex SQLite'*
5249093 -rwxr-xr-x  1 root root   320704 Jan 31 20:59 'Plex Transcoder'*
5249092 -rwxr-xr-x  1 root root  3071768 Jan 31 20:59 'Plex Tuner Service'*
5250541 drwxr-xr-x 10 root root    12288 Feb  1 11:19  Resources/

I gathered the logs while it’s stuck in the scanning-procedure. 5 audiobooks were added. Meanwhile about 10 or 15 were uploaded into the mediadirectory.
Plex Media Server Logs_2022-02-02_16-48-48.zip (6.7 MB)

Could you try and keep that as a minimum (Like only one), as well as provide some names here so we know what to search for?

Please reproduce with above recommendation, and upload a new set of logs

First I restarted the hostmachine. Then I prepared some testsets named Test1 to 5 and copied them separately. All went fine. Then I removed them, cleaned the packages, optimized the database and emptied the recycle bin.

So I created another testset named Test10 to Test 20. I prepared the folders on the local hdd containing 59 files each. all mp3-tag adjusted to the foldername, i.e. Test10-Audiobook, Test10-Artist, Test10-Track .

I copied Test10 and Test 11 separately, after each scanning-job had finished → no issues
Test12 and Test 13 I copied in one go → no issues
Test 14, 15 and 16 also in one go → no issues
Then 17 to 20 in one go → 17 and 18 appeared in the recently added list, then the server got stuck. 19 and 20 didn’t appear. Windows copied the directories in ascending order.

I’ll include the logfiles collected a few minutes later.

Plex Media Server Logs_2022-02-03_13-13-34.zip (7.1 MB)

Then I cancelled the libraryscan. 19 and 20 appeared on the list. The spinner didn’t stop, still showing scanning in progress. Collected another set of logfiles.

Plex Media Server Logs_2022-02-03_14-25-11.zip (7.4 MB)

Cancelled again. Now spinner stopped. Gathered a new set of logfiles.
Plex Media Server Logs_2022-02-03_14-28-25.zip (7.4 MB)

Thanks for the logs and the very detailed explanation

Sadly, I suspect a space for improvement in the code, and looks like it’s siml. to this:

An internal issue has been raised

Thanks dane22 for helping.

If it might be of interest, since the plex-server-version on the ArchLinux AUR-Package is newer than the one for Debian.

On the latter I use the following repository:

root@debnas.fritz.box:/etc/apt/sources.list.d# cat plexmediaserver.list
# When enabling this repo please remember to add the PlexPublic.Key into the apt setup.
# wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add -
deb https://downloads.plex.tv/repo/deb/ public main

Debian 10: Version 1.25.4.5487
Arch-AUR: Version 1.25.5.5492

On Debian I just did an “apt update”, but no newer version was shown.
The AUR-repository also is up-to-date.

Hi,

I’ve seen the same (or very similar) issue since 1-2 weeks.

Scanner gets stuck on some seemingly random file. At least the Activity spinner says “Scanning : Filename” Settings>Libraries also shows a spinner. However, i’ll tailed all the log files and there is 0 scanning activities are happening. The problem is this blocks all new scans (manually starting one, or triggered other software), so all new files wont show up till i restart plex and start a library scan. A few hours later , the scaner is stuck again.

Plex Media Server v1.25.5.5492-12f6b8c83
Linux version: 5.12.8-051208-generic

I’m using the docker plexinc/pms-docker:plexpass (tried beta and public). :latest from 2 weeks ago seemed to not have the issue.

Hi,
same problem here since last two updates. On my synology server scanning always freeze at Music_videos folder and than does not scan movies or tv shows.
Is there a way to disable specific root folder scanning (ie. my Music_videos) ?

installed version: 1.25.5.5492-6000
DS920+
DSM 6.2.3-25426 Update 2

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