I’ve had this problem for a few months now, hoping these frequent plex server updates will solve the problem but unfortunately not.
Every time I add new media in the plex server and do a re-scan (Scan Library files), everything is fine (metadata, thumbnails, etc…). But the server is then unreachable. I have to restart the Plex Server in Synology Packages and everything is OK again. I do not have the “Scan library automatically or periodically” on, I’ve been using Plex for about 5+ years now and have never encountered this problem until recently (3-4 months?)
Any insight on what’s going on? quite frustrating since I’m adding new media everyday.
Thanks in advance.
David
Server Version#:1.18.8.2468-5d395aa9d
Player Version#:
Seems like users can still see video playback during “Scanning library files”, maybe because there is a buffer or cache preloaded? but after rescan is done, further access is not possible (Server unreachable). Doesn’t matter what client (Roku, apple tv, plex.tv app via browser, etc…
The Plex status in Synology is still “running”, just no access. BUT it seems like it solves itself after a while (maybe 15+ minutes or so?), but I haven’t confirmed this.
Once I see that the server is unreachable, I just restart the Plex app in synology package and everything is fine.
Hope that helps. let me know if there is more information you need.
Mar 02, 2020 11:56:16.826 [0x7fb4b25a1700] DEBUG - Subtitles: Found a candidate subtitle language [eng] for a foreign film
Mar 02, 2020 11:56:16.826 [0x7fb4b25a1700] DEBUG - Audio Stream: 158748, Subtitle Stream: 158749
Mar 02, 2020 11:56:16.826 [0x7fb4f8a13700] WARN - SLOW QUERY: It took 121870.000000 ms to retrieve 1 items.
Mar 02, 2020 11:56:16.826 [0x7fb4c0855700] DEBUG - Last refresh (2020-03-02 08:59:32) appears to be older than directory change time (2020-03-02 10:43:24), need to refresh local media agent.
Mar 02, 2020 11:56:16.826 [0x7fb513a97740] DEBUG - Captured session 10.
This is 121.87 seconds to access the database. (2 minutes). Normal database operations for 1 item are normally 1-5 milliseconds.
I see you have Docker containers running. Are they doing anything to consume your disk i/o at that point which would make the database so slow?
Are you running out of physical memory and it’s swapping?
Other clustered SLOW QUERY messages
Mar 02, 2020 11:56:16.811 [0x7fb4b16fb700] WARN - SLOW QUERY: It took 133430.000000 ms to retrieve 2 items.
Mar 02, 2020 11:56:16.811 [0x7fb513a97740] DEBUG - Captured session 1.
Mar 02, 2020 11:56:16.811 [0x7fb4b16fb700] DEBUG - Last refresh (2020-03-02 08:59:39) appears to be older than directory change time (2020-03-02 10:43:24), need to refresh local media agent.
Mar 02, 2020 11:56:16.812 [0x7fb43b447700] WARN - SLOW QUERY: It took 121800.000000 ms to retrieve 4 items.
Mar 02, 2020 11:56:16.812 [0x7fb4b0b43700] WARN - SLOW QUERY: It took 133380.000000 ms to retrieve 1 items.
Mar 02, 2020 11:56:16.814 [0x7fb4b2e6b700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/system/agents/update?mediaType=4&force=1&respectTags=0&parentGUID=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F350667%2F2%3Flang%3Den&parentID=74532&guid=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F350667%2F2%2F5%3Flang%3Den&id=76030&agent=com.plexapp.agents.localmedia&async=0
Mar 02, 2020 11:56:16.814 [0x7fb43b159700] WARN - SLOW QUERY: It took 133460.000000 ms to retrieve 1 items.
Mar 02, 2020 11:56:16.814 [0x7fb4b0b43700] DEBUG - Last refresh (2020-03-02 08:49:42) appears to be older than directory change time (2020-03-02 10:43:24), need to refresh local media agent.
Mar 02, 2020 11:56:16.814 [0x7fb4b2b7d700] WARN - SLOW QUERY: It took 133470.000000 ms to retrieve 1 items.
Mar 02, 2020 11:56:16.815 [0x7fb4fb029700] WARN - SLOW QUERY: It took 121820.000000 ms to retrieve 2 items.
Mar 02, 2020 11:56:16.816 [0x7fb43ab7d700] DEBUG - Refreshing GUID: 'com.plexapp.agents.thetvdb://299139/4/7?lang=en'
Mar 02, 2020 11:56:16.816 [0x7fb513a97740] DEBUG - Captured session 2.
Mar 02, 2020 11:56:16.816 [0x7fb43ab7d700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/system/agents/update?mediaType=4&force=1&respectTags=0&parentGUID=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F299139%2F4%3Flang%3Den&parentID=55941&guid=com%2Eplexapp%2Eagents%2Ethetvdb%3A%2F%2F299139%2F4%2F7%3Flang%3Den&id=57987&agent=com.plexapp.agents.localmedia&async=0
Mar 02, 2020 11:56:16.817 [0x7fb4b16fb700] DEBUG - Refreshing GUID: 'com.plexapp.agents.thetvdb://299139/4/13?lang=en'
Mar 02, 2020 11:56:16.817 [0x7fb513a97740] DEBUG - Captured session 3.
Mar 02, 2020 11:56:16.817 [0x7fb4b16fb700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/system/agents/update?mediaType=4&force=1&respectTags=0&parentGUID=com%2Eplexapp%2Eagents%2Eth
Settings - Server - Scheduled Tasks.
a. Turn on the DB optimization if not already enabled (likely not)
b. Also turn on the backups if not (I am concerned you have no backups either).
Hover over the Libraries in the left panel to expose the ellipsis.
a. Click the ellipsis
b. Manage Server
c. Optimize Database
Settings - Server - Scheduled Tasks.
a. Turn on the DB optimization if not already enabled (likely not)
b. Also turn on the backups if not (I am concerned you have no backups either).
I had these on already, as per screen shot attached.
Hover over the Libraries in the left panel to expose the ellipsis.
a. Click the ellipsis
b. Manage Server
c. Optimize Database
Added some new media in a few different video folders. (about 15 files, into 4-5 different folders)
Hit “Scan library files” for those relevant folders.
Scanning takes proceeds, plex collects metadata, thumbnails, and updates each folder correctly.
Everything is working fine, but after about 5, ‘Dashboard’ is not updating and the circular arrow is just spinning. This happens for the next 3-5 minutes. (no CPU, RAM, bandwidth graph, etc…) During this time, Tautulli loses connection to Plex (no updates, just spinning arrow)
Plex is unreachable again.
Restart Plex server package, and everything is fine again.
I have attached the logs for this. Can you have a look? Logs-2.zip (5.4 MB)
Mar 02, 2020 21:19:34.555 [0x7fa0632f9740] DEBUG - Captured session 6.
Mar 02, 2020 21:19:34.555 [0x7fa0632f9740] DEBUG - Captured session 7.
Mar 02, 2020 21:19:34.555 [0x7fa0632f9740] DEBUG - Captured session 8.
Mar 02, 2020 21:19:34.555 [0x7fa0632f9740] DEBUG - Captured session 9.
Mar 02, 2020 21:19:34.582 [0x7f9f87159700] WARN - SLOW QUERY: It took 38510.000000 ms to retrieve 1 items.
Mar 02, 2020 21:19:34.583 [0x7fa04fc2c700] WARN - SLOW QUERY: It took 38470.000000 ms to retrieve 1 items.
Mar 02, 2020 21:19:34.583 [0x7fa00ee6b700] WARN - SLOW QUERY: It took 38430.000000 ms to retrieve 1 items.
Mar 02, 2020 21:19:34.583 [0x7fa00c855700] WARN - SLOW QUERY: It took 38520.000000 ms to retrieve 1 items.
Mar 02, 2020 21:19:34.585 [0x7fa02bfff700] WARN - SLOW QUERY: It took 38620.000000 ms to retrieve 1 items.
Mar 02, 2020 21:19:34.585 [0x7f9fe6e6b700] WARN - SLOW QUERY: It took 38590.000000 ms to retrieve 1 items.
Mar 02, 2020 21:19:34.587 [0x7fa04fc2c700] DEBUG - We're going to try to auto-select an audio stream for account 1.
Mar 02, 2020 21:19:34.587 [0x7fa04fc2c700] DEBUG - Selecting best audio stream for part ID 80136 (autoselect: 1 language: en)
Mar 02, 2020 21:19:34.587 [0x7fa04fc2c700] DEBUG - We're going to try to auto-select a subtitle.
Mar 02, 2020 21:19:34.587 [0x7fa04fc2c700] DEBUG - Subtitles: Found a candidate subtitle language [eng] for a foreign film
Mar 02, 2020 21:19:34.587 [0x7fa04fc2c700] DEBUG - Audio Stream: 219214, Subtitle Stream: 221835
Mar 02, 2020 21:19:34.588 [0x7fa0632f9740] DEBUG - Captured session 10.
Mar 02, 2020 21:19:34.588 [0x7fa04fc2c700] DEBUG - Request: [172.17.0.2:55842
For comparison, do you have an older version of PMS you can downgrade to?
It might point some light definitively on version versus environment.
There is a second comparison we can perform.
We set the existing server off to the side and construct a “TEST” server name.
This type test is used to see if there is a deep corruption that PMS itself can’t detect (which happens rarely but does happen)
I’m having the exact same issue. I’m a relatively new user to the Plex Media Server, but very new to my Synology NAS. Could you advise me on how to restart the Plex Server via the Synology NAS?
goto synology DSM (port 5000), click on package center, then Plex. Under the “Action” pulldown menu, choose stop. I usually give it a minute, then start it again.