Database keeps locking.

So I moved my plex machine from one to another. I initially tried to just copy the DB over but when it would try to add new data, it would lock the DB. So I wiped everything and started with a empty DB, and went to just scan the folders to add them to the library and after 15 minutes or so, the DB gets locked and I have to restart the whole machine to unlock the DB.

How do I fix this? Its driving me nuts!!!

This is on Ubuntu 16.04 using 1.13.2.5102

I saw an old thread that was talking about drive sizes, so I’ll post this just to be safe.
fdisk -l
Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x6d7e10e7

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2000895 1998848 976M 83 Linux
/dev/sda2 2002942 937701375 935698434 446.2G 5 Extended
/dev/sda5 2002944 937515007 935512064 446.1G 83 Linux
/dev/sda6 937517056 937701375 184320 90M 82 Linux swap / Solaris

That’s not the information needed. df tells you the disk information needed in Linux (total space, used, and available)

Open a terminal window,
sudo sh (and enter the password)
tar cfz /tmp/plexlogs.tar.gz "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs"

Please attach the plexlogs.tar.gz with your next post.

Filesystem 1K-blocks Used Available Use% Mounted on
udev 16435868 0 16435868 0% /dev
tmpfs 3291612 9228 3282384 1% /run
/dev/sda5 460285008 41210984 395669840 10% /
tmpfs 16458048 8 16458040 1% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 16458048 0 16458048 0% /sys/fs/cgroup
/dev/sda1 983704 130500 803236 14% /boot

Thanks.

I see the logs where the internet connection keeps going up & down (offline).

Is this a LAN or Datacenter (VPS) system? The IP looks like a datacenter

It is a dedicated server in a datacenter.

Please do reach out to have them find out what’s happening.

May 30, 2018 17:15:52.259 [0x7fa20f3fe700] DEBUG - MyPlex: We appear to have lost Internet connectivity, resetting device URL cache.
May 30, 2018 17:15:52.259 [0x7fa20f3fe700] ERROR - EventSource: Retrying in 15 seconds.

When PMS resets like this, it has to unwind and restart everything it was doing. granted this might be exposing a secondary issue but we need to eliminate the connectivity issue before we can decide if that’s the trigger

I wonder if those are from when I rebooted the server. When it stops responding, it wont let anything play, and restarting the service doesn’t resolve the issue so I had to reboot the server multiple times today. I remember doing it, I think 4 times today. A couple were around 2pm, and i remember doing one around 5pm.

I wonder if running the scanner at lower priority will stop the DB from being busy.

Each time the server is rebooted, it starts with a fresh log file. What I found were mid-file.
You should run the scanner at normal if the CPU is normally high usage. It should get into and out of the DB as fast as possible because other resources are waiting for it

I found this in the syslog. Dunno if it means anything to you.

Heres a copy of my syslog. I edited out all the plexdrive entries ot make it smaller.

INFO: task Plex Media Scan:30048 blocked for more than 120 seconds.

That pops up alot. I wonder if that is part of my issue.

You have media mounted on a remote drive (rclone) ? FUSE = Filesystem in User SpacE.
it’s faulting and bringing Plex down with it.

Cool. I will look into the fuse. Thanks!

When I installed Ubuntu 16.04 and updated it, it gave a GRUB error. I ignored it. Whatever that error was was the cause of my problems. I reinstalled a fresh 16.04, updated it and fixed the GRUB error. Scanned 1500 movies in 2 hours! OMG! Thanks for the help!!!