Astronomical large database slow

I am having the same problem after upgrade to 1.18.x. Plex will crash after startup most of the times or after about 10 to 15 min when processing the repo…
I using it on docker with linuxserver/plex and I just tried the 1.18.4.2164-2aa83397b version but I am still having the same issues:
One common thing I get in the docker logs is this message:

Exception AttributeError: "'ZipArchive' object has no attribute '_zip'" in <bound method ZipArchive.__del__ of <Framework.components.data.ZipArchive object at 0x7fc9083653d0>> ignored

Resource is not a problem, the machine has 32 threads and 128GB of ram and the container has no restrictions. I can see that plex is doing something since CPU utilization goes between 400 to 900% but it is unreachable (through a browser and the app) …

I get as well a lot of:

WARN - SLOW QUERY: It took 84640.000000 ms to retrieve 0 items.
WARN - SLOW QUERY: It took 124450.000000 ms to retrieve 0 items.
DEBUG - It took 108190.000000 ms to retrieve 1123 items.

and a lot more:

DEBUG - Auth: authenticated user 1 as XXXXX
1 Like

@Maraschin

From those logs, you have a MAJOR library fragmentation problem.

Did you disable the automatic optimization in Scheduled Tasks or is the server OFF when it’s supposed to run?

I hope “User 1” is your user account. If not, you have a big problem with which username (someone else?) owns it.

To correct the database problem you show (unthinkable)

Hover over Libraries , expose the ellipsis and click it.
Optimize Database

Restart PMS

Screenshot from 2019-12-19 10-58-11

I did run optimize, restart it when it was done and it crashed.
I tried as well delete everything and create a new server, same problem.

reading back…

900% CPU? What is it doing if I may ask? That’s a serious load

Also, this is worthy of its own thread. This isn’t the “No Soup for you” problem with Plex/web which is seen.

@Maraschin

You mention “Container” - I need details for this too. This thread is about the native app. Docker (supported) or OMV (which isn’t supported) can carry a whole host of problems unto themselves.

Also, how big is the actual DB file?

DB : 717 327 360 Dec 19 20:37 com.plexapp.plugins.library.db
Wal : 734 023 424 Dec 19 20:39 com.plexapp.plugins.library.db-wal
Blob: 84 631 552 Dec 19 09:00 com.plexapp.plugins.library.blobs.db

Container: running LinuxServer.io (for quite a few years, latest version)
https://hub.docker.com/r/linuxserver/plex/
Docker version 1.12.1
Linux 4.4.0-169-generic #198-Ubuntu SMP x86_64 GNU/Linux
I can kill it, delete everything and start from the begining if you think it may help.

This is nothing like the problem seen in the other thread.

I need to ask: Just how much do you have indexed?

a 700 MB database is huge.

oops, I am in big trouble then.

:innocent:

@Maraschin if the plex data is not already on an SSD, you should definitely consider upgrading to the largest SSD you can afford.

If you like or have chapter thumbnails/video previews enabled, then you probably want to consider minimum 1tb ssd.

Tekno,

Let’s first see what’s wrong with his server? Hmmmmmm ??? :smiley: lol

maybe check this

unraid had some serious issues recently with kernel versions causing sqlite problems.
I run unraid and I use a cache drive which is SSD.

I read about it for a while and it seemed to affect users that used the array as their config folder for a docker where I use the cache drive so it doesn’t get written to the array until after hours.

this didn’t just impact Plex but affected any docker with sqlite such as sonarr and others.

Do you have any other dockers like sonarr, sickbeard, sabnzbd that use sqlite?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.