Library scanning problems

Server Version#: 1.42.2.10156 (plexinc/pms-docker)

I have been having problems when I am scanning my music library for new music. I see a bunch of DB corruption messages and the music isn’t added to the library.

I did the following to troubleshoot

  1. shutdown pms
  2. deleted DB
  3. started pms
  4. created Library (music)

The config directory is served from the internal hard drive of the ubuntu server with ext4 partition.

I have tried this several times and have seen the server crash, I have seen a few albums load in the UI, and I have seen the message “Something went wrong An unexpected error occurred” instead of the album list.

Plex Media Server Logs_2025-10-14_20-16-13.zip (1.1 MB)

Something is interacting with the database causing database corruption. From what I can see you are running some kind of Linux distro. Are the databases on a network share, do you have an antivirus scanning, or is something causing plex to shut down unexpectedly?

Oct 14, 2025 20:13:39.096 [139965063244600] ERROR - Got exception from request handler: sqlite3_statement_backend::loadOne: database disk image is malformed

Ubuntu Desktop installation. No antivirus. /config is on the internal drive in my users home directory (thus not network share).

I just recreated the server pointing to a new folder location that I created just for plex configuration outside of the users home directory (/mnt/docker/plex-server/config). Still had the same problem.

Plex Media Server Logs_2025-10-15_06-04-09.zip (200.0 KB)

I may have found the reason. I am using Docker Desktop on Ubuntu. Docker Desktop uses virtiofs, which apparently can cause the data corruption. I will have to see what options I have. Probably will have to uninstall Docker Desktop and use something else. I will update this post when I have found out more.

@dbirch

I uninstalled Docker Desktop, installed the Docker engine and ran portainer on it. With some tweeks to the docker-compose.yaml files, everything is working now.

The plex container documentation needs to indicate that running plex on Docker Desktop isn’t supported, due to the fact that Docker Desktop uses virtiofs for volume access and sqlite is easily corrupted on virtiofs.

This is something I’ve never understood, just install the app at the OS level and don’t add an additional layer of complexity via docker. When using docker or other container-based solutions its great for rapid prototyping/testing/sampling but for long term stable solutions just run it directly on the OS. KISS

Different strokes for different folks. I’ve only ever ran Plex in docker, I currently have two servers running on Ubuntu and DSM 7, (I can hear ChuckPA’s disgust :rofl:.) To KISS, I only use docker compose files and manage the containers via Portainer. Maybe one day I’ll try it at the bare OS level, but my containers have been rock solid for two plus years and if I want to downgrade I just change the image.