Plex media server hangs during library update

Hi,

Starting a few weeks ago, my Plex Media Server will hang while updating the library. The hang is so bad that the machine will not even reboot and I need to hardware reboot it. When I look at the status of the library update from the Status Bar menu it says “Loading metadata…” for an individual release, however it’s a different release each time. Can anyone help with this issue?

David

Attached my server logs (I needed to restart the server just now).

Wondering if anyone on the Plex team is able to help?

Have you tried to optimize your db?

No, I haven’t tried that, but I did delete my entire database and start Plex from scratch (re-add media to Library etc) and the same issue is reoccurring.

Sounds like you can dump your library and add it back easily…

can you delete again and add a few items and see if its still crashing on library update?

@dwinarsky said:
Attached my server logs (I needed to restart the server just now).

First i would advise to tidy up how you setup your libraries and follow the guidelines outlined on these support pages https://support.plex.tv/hc/en-us/categories/200028098-Media-Preparation

You should not be merging all your different media types into one library path
You have a Movies library which is defined with a path that is at the higher level /shares/data
This is wrong thing to do. The paths should be at the directory level for directories that contain movies

Sep 05, 2017 19:13:19.270 [0x7fffa1aa73c0] DEBUG - Scanning Movies using en(Plex Movie Scanner) with 219 current media items and 1 section locations in the database...

Sep 05, 2017 19:13:19.365 [0x7fffa1aa73c0] DEBUG -   * Scanning /shares/data

Sep 05, 2017 19:13:19.371 [0x7fffa1aa73c0] DEBUG - Adding subdirectory for scanner: /shares/data/Home Movies
Sep 05, 2017 19:13:19.372 [0x7fffa1aa73c0] DEBUG - Adding subdirectory for scanner: /shares/data/Movies
Sep 05, 2017 19:13:19.373 [0x7fffa1aa73c0] DEBUG - Adding subdirectory for scanner: /shares/data/TV Shows
Sep 05, 2017 19:13:19.374 [0x7fffa1aa73c0] DEBUG - Adding subdirectory for scanner: /shares/data/nzbs
Sep 05, 2017 19:13:19.375 [0x7fffa1aa73c0] DEBUG - Adding subdirectory for scanner: /shares/data/tmp
Sep 05, 2017 19:13:19.377 [0x7fffa1aa73c0] DEBUG - Adding subdirectory for scanner: /shares/data/Kids TV Shows
Sep 05, 2017 19:13:19.378 [0x7fffa1aa73c0] DEBUG - Adding subdirectory for scanner: /shares/data/Kids Movies

You are scanning nzbs whatever that is. and tmp

So for the Movies library, you should set the library path to be /shares/data/Movies

I see you already have /shares/data/TV Shows in a separate TV Shows library and you already have Kids TV Shows library for /shares/data/Kids TV Shows

and you already Kids Movies as a library for /shares/data/Kids Movies

so just need to correct the Movies library folder to change from /shares/data to /shares/data/Movies`

Once you have the paths right then we can review if you still have problems (with fresh logs)

Thank you for the suggestions, I’ve made all of the changes above and I’ll wait a couple days to see if the hang occurs again (usually it’s once every few days).

I made all of the above changes and suggestions, however my server is now locked up again. The status shows it is hung scanning the “TV Shows” library. It has been hung in this behavior for a long time now and is not picking up any additional library updates.

I’ve attached a new set of logs with the server in this state.

Thanks i am looking at the logs. They show the last scan of the TV Shows library being on 10th September at 20:56 but subsequent updates to the library did not generate a new scan because it thought a refresh was done recently - possibly caused by some individual show refresh. I need to look into in more detail

Thanks for investigating. When I looked at the status on the server, it was stuck in “updating library”. From the menu bar/ status bar it showed “updating library” forever and then from within the Plex web app, the refresh circle was spinning constantly next to “TV Shows”. I tried to trigger a library update manually through both interfaces and nothing happened.

Unfortunately the Plex Media Server log files do not go back to the time the last library scan was run - 10th 20:56

May be if reproducible to reboot and when it gets stuck to take the logs and screenshot showing time and to capture before firing any futher updates