Library scan causing playback issues

Server Version#:1.42.1.10060
Player Version#:1.110.0.351-4e48eb83. also webapp, also android, etc

So recently (last 60d) my plex media server has come to a screeching halt whenever a scan occurs or any of it’s tasks start happening. I would love to figure out what logs I can look at to see what specific errors there are.

This server is running as a direct install on ubuntu and the host is way overprovisioned for this service. I’ve run diagnostics on the host itself and see no issues: cpu, ram, network, ssd are all good. I’m kind of at my wit’s end.

I’ve remade the libraries as well as tried to export logs and there’s so many and I don’t see any specific issues from the ones I’ve looked at. Please advise what I can do to help troubleshoot this.

May I see server DEBUG logs ZIP file, which captures this?

Specifically, Please start the playback and then cause the problem.

Stop the playback
Download the server logs ZIP file
Attach that ZIP file here.

I’ll look at it.

Plex Media Server Logs_2025-09-23_03-22-26.zip (3.5 MB)

Very easy duplicatable. Let me know if you need anything further.

Here is a better debug bundle where it got hung on the task to create thumbnails and playback refuses to work until I restart the service.

Plex Media Server Logs_2025-09-23_14-33-00.zip (3.7 MB)

@ChuckPa did you find anything in the above?

@Fadwen

Hi,

Yes, I did find some interesting things. I’m still trying to repeatably isolate (reproduce) the root cause. I’m sorry that I didn’t update you sooner on what I’m doing. ( I’ve been swamped with everyone having trouble reclaiming their servers)

Given we have nearly identical machines, I’d like to compare them.

I have:

  • i9-12900
  • 64 GB RAM
  • 3x 1TB NVMe SSD
  • 10 GbE wired ethernet (connects to NAS w/ 20 GbE and AP w/ 2.5 GbE)

What do you have?

How much media do you have (counted in thousands) indexed into Plex ?
( I use find to get my counts: )

[chuck@lizum media.2003]$ find . -type f -print | wc -l
74564
[chuck@lizum media.2004]$

Databases are:

[chuck@lizum Databases.2001]$ ls -lah
total 5.6G
drwxr-xr-x 2 plex plex 4.0K Sep 28 12:00 ./
drwxr-xr-x 7 plex plex  120 Apr 10 20:11 ../
-rw-r--r-- 1 plex plex 387M Sep 28 12:00 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex 387M Sep 18 02:10 com.plexapp.plugins.library.blobs.db-2025-09-18
-rw-r--r-- 1 plex plex 387M Sep 21 02:00 com.plexapp.plugins.library.blobs.db-2025-09-21
-rw-r--r-- 1 plex plex 387M Sep 24 02:19 com.plexapp.plugins.library.blobs.db-2025-09-24
-rw-r--r-- 1 plex plex 387M Sep 27 02:10 com.plexapp.plugins.library.blobs.db-2025-09-27
-rw-r--r-- 1 plex plex  32K Sep 28 12:00 com.plexapp.plugins.library.blobs.db-shm
-rw-r--r-- 1 plex plex    0 Sep 28 12:00 com.plexapp.plugins.library.blobs.db-wal
-rw-r--r-- 1 plex plex 618M Sep 29 13:53 com.plexapp.plugins.library.db
-rw-r--r-- 1 plex plex 606M Sep 18 02:07 com.plexapp.plugins.library.db-2025-09-18
-rw-r--r-- 1 plex plex 617M Sep 21 02:00 com.plexapp.plugins.library.db-2025-09-21
-rw-r--r-- 1 plex plex 627M Sep 24 02:14 com.plexapp.plugins.library.db-2025-09-24
-rw-r--r-- 1 plex plex 617M Sep 27 02:08 com.plexapp.plugins.library.db-2025-09-27
-rw-r--r-- 1 plex plex 160K Sep 29 14:13 com.plexapp.plugins.library.db-shm
-rw-r--r-- 1 plex plex  67M Sep 29 14:13 com.plexapp.plugins.library.db-wal
-rw-r--r-- 1 plex plex 3.9K May 17 21:38 DBRepair.log
-rw-r--r-- 1 root root 647M Sep 21 23:25 db.sql
[chuck@lizum Databases.2002]$

Thanks for the reply!

the hardware specs are pretty similar there. Minisforum MS-01 Work Station is what I’m using, but also below:
CPU: i9-13900H
Mem: 32GB
3x NVME SSD, 1x2tb, 2x1tb.
2x 10GbE SFP available but not connected
2x 2.5GbE, only one connected

NAS is accessed via 2x bonded 1GbE nics.
I exclusively watch via ethernet router is a ubiquiti dream machine ports at 1GbE, wifi is unrelated but I do have a ubiquiti AP for that.

I recently rebuilt my storage (while I was trying to troubleshoot this) and have quite a lot less than I used to. Currently I’ve only reattached TV shows and here is the results of the command
betar@ms01a:/mnt/Series$ find . -type f -print | wc -l
6900
betar@ms01a:/mnt/Series$

My Plex app size:
Total Plex Directory: 17 GB

  • Database (active): 189 MB
  • Database (with backups): 8.8 GB
  • Plug-in Support: 8.8 GB total
  • Metadata: 3.3 GB
  • Media (thumbnails/art): 2.4 GB
  • Cache: 2.0 GB
  • Other (drivers, scanners, logs): ~400 MB

What’s the total media count being indexed (series, movies, music, and photos)?
May I see ls -lah of the Databases directory ? I suspect they will be only a few hundred MB each.

betar@ms01a:/mnt/Series$ ls -lah /mnt/ssd2tb/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/
total 8.8G
drwxr-xr-x 2 plex plex 4.0K Sep 29 12:58 .
drwxr-xr-x 7 plex plex 4.0K Jul 26 03:24 ..
-rw-r--r-- 1 plex plex  88K Sep  6 12:35 com.plexapp.dlna.db
-rw-r--r-- 1 plex plex  32K Sep  6 12:35 com.plexapp.dlna.db-shm
-rw-r--r-- 1 plex plex 330K Sep  6 12:35 com.plexapp.dlna.db-wal
-rw-rw-r-- 1 plex plex 6.3M Sep 29 12:58 com.plexapp.plugins.library.blobs.db
-rw-r--r-- 1 plex plex 2.4G Sep 18 03:01 com.plexapp.plugins.library.blobs.db-2025-09-18
-rw-r--r-- 1 plex plex 2.4G Sep 21 03:00 com.plexapp.plugins.library.blobs.db-2025-09-21
-rw-r--r-- 1 plex plex 2.4G Sep 24 03:03 com.plexapp.plugins.library.blobs.db-2025-09-24
-rw-r--r-- 1 plex plex 4.0M Sep 27 03:00 com.plexapp.plugins.library.blobs.db-2025-09-27
-rw-rw-r-- 1 plex plex  32K Sep 29 12:58 com.plexapp.plugins.library.blobs.db-shm
-rw-rw-r-- 1 plex plex    0 Sep 29 12:58 com.plexapp.plugins.library.blobs.db-wal
-rw-rw-r-- 1 plex plex 181M Sep 29 18:33 com.plexapp.plugins.library.db
-rw-r--r-- 1 plex plex    0 Mar  1  2025 com.plexapp.plugins.library.db-2025-03-01-tmp
-rw-r--r-- 1 plex plex 1.1G Sep 18 03:01 com.plexapp.plugins.library.db-2025-09-18
-rw-r--r-- 1 plex plex 124M Sep 21 03:00 com.plexapp.plugins.library.db-2025-09-21
-rw-r--r-- 1 plex plex 144M Sep 24 03:03 com.plexapp.plugins.library.db-2025-09-24
-rw-r--r-- 1 plex plex 176M Sep 27 03:00 com.plexapp.plugins.library.db-2025-09-27
-rw-rw-r-- 1 plex plex  32K Sep 29 18:36 com.plexapp.plugins.library.db-shm
-rw-rw-r-- 1 plex plex 1.1M Sep 29 18:36 com.plexapp.plugins.library.db-wal

media count I thought that was the command I ran earlier?

betar@ms01a:/mnt/Series$ find . -type f -print | wc -l
6900
betar@ms01a:/mnt/Series$

if I filter by episode within plex itself it says 5230 episodes. (only tv shows atm)

I have trouble with Plex doing all it’s work when I add tv series.

It does

  • analysys
  • credit detection ( which I turn off )
  • intro detection (which I turn off)
  • Thumbnail generation (which I ALSO turn off)

When I had only gigabit, I would run into all kinds of trouble like you are
my Dragon Canyon (NUC12DCMI9-full) has a 10 GbE native adapter.
I have a 24 port 10GbE Netgear switch to run everything.

so here’s first test.

  1. take your biggest media file
  2. in terminal, cd to that directory
  3. dd if=Filename.xxx of=/dev/null bs=4M status=progress

You should get close to full 1 GbE speed for that.
( Rules of LACP dictate that process gets one link’s speed )

If you run two (separate windows), you should should pull almost 2 GbE with both links running.

That will confirm the status of basic disk i/o

I ran two terminals with the dd on same file at same time and it seems fine like you said.

2989+1 records in
2989+1 records out
12539705603 bytes (13 GB, 12 GiB) copied, 89.0025 s, 141 MB/s

2989+1 records in
2989+1 records out
12539705603 bytes (13 GB, 12 GiB) copied, 116.393 s, 108 MB/s

I’ve had this plex setup working just fine for maybe 5 months prior? and prior to that for about 4 years in docker on a different host. all on the same network with the same plex settings. I’m unsure what to make of the disruption, was there anything in the logs that pointed to something on plex? The only thing I haven’t done yet in troubleshooting is move the db off and do a complete reinstall on the host.

That’s what I’m at in what I saw in your DB.

If you’re ready.

  1. For each library section: Scan files, Empty Trash, Clean Bundles.
  2. when all are done, as ‘root’, run my DBRepair.sh tool
sudo ./DBRepair.sh  stop auto prune start exit

That Stops PMS, Auto optimizes the PMS DB in a way Plex can’t, Prunes all the old files out of Cache, then starts Plex and exits

I’m suggesting this at this point because:

  1. Adding media does a lot of thrashing on the DB
  2. If the data records are sorted (which DBRepair does), adding / scanning media is an order of magnitude faster.

Before you do this, In Plex/web, use the search function to look for a title.
Time it

After this is done optimizing, Repeat and time it again.
Also see how quickly your sections load.

Let me know if you see any differences. :wink:

Things appear to be working much better and performant as far as the loading occurs! When scanning manually it doesn’t appear to be disrupting playback now either. I’ll report back on how the interaction with the daily tasks goes as well in the morning.

Would there be anything wrong with me running this repair script on a bimonthly/quarterly cron?

Nothing wrong at all running it weekly if you want.

What I find is that most folks run it frequently.
As their libraries grow, the delta is even more pronounced.

How are your posters loading now?

How big is the Cache directory ?

It is much quicker now in the poster loading, yes.

betar@ms01a:~$ du -sh /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Cache/* | sort -hr
1.2G /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder
584M /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode
224K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/fontconfig
160K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/neo_compiler_cache
32K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/relayHostKey.txt
28K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudAccessV2.dat
20K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudUsersServices.dat
16K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Flags.dat
16K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudAccountV2.dat
12K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Privacy.dat
12K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/autotag_wordlist.json
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Shaders
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/OCSP
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudUsersV2.dat
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudUsersSubscriptionsV2.dat
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudUsersF.dat
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/cl-icds-linux-x86_64
8.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/cert-v2.p12
4.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/UpdateChannels.dat
4.0K /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CL-ICDs
0 /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudUsersServices.dat.tmp.92ae9692-f87a-4eab-aef9-fbdf708c49ca
0 /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/CloudUsersServices.dat.tmp.2180eed4-6dd0-453d-a6f7-8e49ff13b688
betar@ms01a:~$

I had set to DB Cache Size to 10240 MB while I was in the process of troubleshooting things. If that’s not recommended I can tone it back down

You don’t need to use 10GB of memory anymore.

I leave the DB cache size at the default of 40MB.

When you occupy too much memory, you make yourself more vulnerable to data loss.

Now, with this tool at your disposal, you just optimize the DB weekly and be done with it.

will do, I think I just kept increasing it trying to figure out where the pain point was lol.

Thank you very much for your help!

You’re really inviting pain. ! :fire:

LOLOLOL

I’m a “If it’s not broke - Don’t fix it” kinda guy :slight_smile:

well this box only exists for plex and I’m usually nowhere close to the 32gb. and I was thinking maybe if something is corrupted despite what memtest says and lets stress test lol

Oh? You want a stress test ? :smiling_face_with_horns:

Run Linpack. That’s stress it.
PS: I do not cleanup slag piles :stuck_out_tongue: lol

1 Like