SLOW QUERY errors

Server Version#: 1.23.3.4707
Player Version#: 1.33.0.2444-a220eae4

I’m seeing a whole load of SLOW QUERY errors in the PMS logs. Media is on unRAID array, Plex Metadata/DB/Config is on a dedicated SATA SSD, not unRAID cache drive. Using official Plex container.

Jun 28, 2021 14:36:12.934 [0x155133a6fb38] Warning — SLOW QUERY: It took 340.000000 ms to retrieve 20 items.
Jun 28, 2021 14:36:12.934 [0x155139418b38] Warning — SLOW QUERY: It took 260.000000 ms to retrieve 17 items.
Jun 28, 2021 14:36:12.938 [0x155133252b38] Warning — SLOW QUERY: It took 320.000000 ms to retrieve 20 items.
Jun 28, 2021 14:36:12.940 [0x155133a4cb38] Warning — SLOW QUERY: It took 210.000000 ms to retrieve 13 items.
Jun 28, 2021 14:36:12.948 [0x1551331efb38] Warning — SLOW QUERY: It took 270.000000 ms to retrieve 20 items.
Jun 28, 2021 14:36:13.012 [0x1551339d5b38] Warning — SLOW QUERY: It took 210.000000 ms to retrieve 22 items.
Jun 28, 2021 14:36:13.037 [0x1551334d3b38] Warning — SLOW QUERY: It took 260.000000 ms to retrieve 31 items.
Jun 28, 2021 14:36:13.126 [0x155133a4cb38] Warning — SLOW QUERY: It took 260.000000 ms to retrieve 49 items.

I have optimised DB and cleared bundles. I have used SQLite to export and reimport the DB as per Repair a corrupted database, even though the intergrity check came back OK.

Any ideas?

bump. wondering if this is expected or an issue?

I have no solution of you, as I see the same behavior in any of the 1.23.x versions.

I see it less often in the 1.22.x versions though, so that’s where I stay for now

@SpuddyUK Can you please share the zip of your logs? Without seeing the entire picture it’s difficult to know what is happening.

@Atomatth shared in PM. Thanks!

I’m not seeing that error in any of your logs. Are you observing any issues or just noticed these entries in the logs?

@Atomatth No particular issues, I noticed the entries in the logs.

I have this exact issue and everyday i am restarting my plex server multiple times as it gets stuck when updating metadata for movies over night and will not complete the task with out restarting multiple times

Can you please share the zip of your logs? Without seeing the entire picture it’s difficult to know what is happening.

PM’d you my logs

You can try using the Optimize Database. You can also try deleting the container and readding it. Just make sure to point it back to the same appdata location.

i have optimized the database, i have removed the container and re-added it and then just for good measure re-optimized the db again. We will see how this goes and whether things improve.

# cat Plex\ Media\ Server.log |grep SLOW |wc -l
87

seems to be more widespread?

@Atomatth

This morning after scheduled tasks over night, it once again is stuck updating metadata. New logs will be dm’d to you.

Been having the same issue as OP for easily over 2 weeks now. My media is on a Synology NAS (6.x, not the newer 7.0 DSM version) and made a post here which has my log files if it helps:

Just chiming in hoping the more of us complaining and the Plex dev team will take this problems seriously.

I’m trying to import my music library and Plex has been running for days now. I setup my library to only use local metadata and logs are full of slow queries.

If I use Airsonic/Madsonc it can scan my whole library in a little over an hour.

Can you please share your logs?

logs.zip (3.1 MB)

Here are a zip of all my logs.

HI Atomatth. Here are my older + current logs (timestamped):

Plex Media Server Logs_2021-08-03_11-20-33.zip (4.5 MB)

Plex Media Server Logs_2021-08-05_20-20-26.zip (4.2 MB)

Plex Media Server Logs_2021-08-11_15-21-05.zip (4.6 MB)

This continues to be a wide-spread issue, and restarting doesn’t help for long.

  • Scanning doesn’t work reliably at all from the GUI
  • Users report shows fail to start (guessing due to high CPU contention for the scanner activity ongoing)

Load is consistently over 3.0 with the Plex Transcoder and/or Plex Media Scanner well over 100%.

I’m seeing the same issue a lot: Slow Query took xxx. On top of this issue, I’m seeing that many of my remote connections will simply say: An error occurred while attempting to play this video. Please check your connection and try again This never happened before and it’s happening on Nvidia shield and firetv devices. This started happening about 1-2 weeks ago. I have tried to optimize the database, clean the bundles, empty trash.

The server is running on UnRaid, Docker + NVidia P2000 for transcoding. Dedicated NVME SSD for the plex DB. Plex Media Server Logs_2021-08-24_21-07-41.zip (5.3 MB)