Plex - Slow library scanning after restoring Plex on Hetzner server | PlexGuide.com

Plex Slow library scanning after restoring Plex on Hetzner server

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

kaijunexus

Citizen
Original poster
Oct 9, 2018
4
1
PG Related
No
Server Type
Dedicated Remote
I recently transitioned from a local server to a Hetzner box. Restored Plex from google cloud backup.

Now I'm seeing extremely slow speeds when performing library scans and getting the following recurring log entries in console...
Code:
Jul 15, 2020 15:20:19.865 [0x7fda4f7fe700] Debug — Request: [127.0.0.1:42122 (Loopback)] GET /identity (7 live) Signed-in
Jul 15, 2020 15:20:19.866 [0x7fda5ffff700] Debug — Completed: [127.0.0.1:42122] 200 GET /identity (7 live) 0ms 398 bytes (pipelined: 1)
Jul 15, 2020 15:20:25.158 [0x7fda4f7fe700] Debug — Request: [127.0.0.1:42156 (Loopback)] GET /identity (7 live) Signed-in
Jul 15, 2020 15:20:25.158 [0x7fda5ffff700] Debug — Completed: [127.0.0.1:42156] 200 GET /identity (7 live) 0ms 398 bytes (pipelined: 1)
Jul 15, 2020 15:20:30.514 [0x7fda4f7fe700] Debug — Request: [127.0.0.1:42186 (Loopback)] GET /identity (7 live) Signed-in
Jul 15, 2020 15:20:30.514 [0x7fda64812700] Debug — Completed: [127.0.0.1:42186] 200 GET /identity (7 live) 0ms 398 bytes (pipelined: 1)
Jul 15, 2020 15:20:35.831 [0x7fda4f7fe700] Debug — Request: [127.0.0.1:42214 (Loopback)] GET /identity (7 live) Signed-in
Jul 15, 2020 15:20:35.831 [0x7fda5ffff700] Debug — Completed: [127.0.0.1:42214] 200 GET /identity (7 live) 0ms 398 bytes (pipelined: 1)
Jul 15, 2020 15:20:41.161 [0x7fda4f7fe700] Debug — Request: [127.0.0.1:42236 (Loopback)] GET /identity (7 live) Signed-in
Jul 15, 2020 15:20:41.161 [0x7fda64812700] Debug — Completed: [127.0.0.1:42236] 200 GET /identity (7 live) 0ms 398 bytes (pipelined: 1)
Jul 15, 2020 15:20:42.466 [0x7fda5cff9700] Debug — Auth: Refreshing tokens inside the token-based authentication filter.
Any ideas?
 
Last edited by a moderator:

Edrock200

MVP
Staff
Nov 17, 2019
545
195
Not sure about the log entries but the slow scan might be due to rclone rebuilding cache if you have a large library.

Do sudo PG, then pgclone, then rclone options.

Set your dir cache much higher than 5m. I have mine set to max, 7240 I think.
Redeploy or restart the box, or restart your drive mounts.

First update your System

Code:
sudo apt update  -y
sudo apt upgrade -y
sudo apt autoclean -y
sudo apt autoremove -y
Then install screen

Code:
sudo apt install screen -y
Then

Code:
sudo screen -S cache bash
Then

Code:
ls -alR /mnt/unionfs
Let it run through the directories. Depending on the size this can take a while.

Do disconnect from the screen
Code:
ctrl + a then d.
To reattach to check progress

Code:
screen -r cache
Once it's done type

Code:
 exit
in the screen window to close the screen session.
 
  • Like
Reactions: 2 users

kaijunexus

Citizen
Original poster
Oct 9, 2018
4
1
Looks like extending the directory cache lifespan did the trick! Scanning is MUCH faster now.

Thanks, Edrock200!!
 
  • Like
Reactions: 1 user

Edrock200

MVP
Staff
Nov 17, 2019
545
195
Glad to hear it. Just FYI, that cache doesn't persist through a reboot. so I created a shell script with this in it:
ls -alR /mnt/unionfs

and created a cron job calling the script with a schedule of @reboot

If you don't do this, your first scan will be slow after a reboot, then subsequent scans will be fast again until the next reboot.
 
Last edited:

Recommend NewsGroups

      Up To a 58% Discount!

Trending