Plex Database Corruption on Unraid: Root Cause Guide

Unraid server storage and Plex database troubleshooting

If the Plex database keeps getting corrupt on Unraid, Plex may report database errors, lose watched status, or repeatedly rebuild library sections. The most common underlying cause is unstable storage, especially a failing disk or filesystem errors on the drive holding Plex’s appdata.

Why this happens

Plex writes frequently to its SQLite database, usually under the Plex appdata directory. If a write is interrupted or the storage layer returns errors, the database can become inconsistent; moving or restoring appdata while Plex is running can cause similar damage.

  • Disk or filesystem trouble: Unreadable sectors, I/O errors, or filesystem corruption interrupt database reads and writes.
  • Unclean shutdowns: Power loss, forced container stops, or host crashes can interrupt a transaction.
  • Appdata placement or access: Incorrect permissions, a full filesystem, or appdata on an unsuitable network or array path can prevent reliable writes.

Use the checks below in order. Back up the Plex appdata before repairing or replacing database files.

Possible causeTypical symptomQuick test
Disk or filesystem errorsCorruption returns after repairReview Unraid system logs and run the appropriate filesystem check after stopping writes.
Appdata on array or network storageDatabase errors during scans or updatesCheck the container’s appdata path and cache or pool placement.
Full storage or permissionsWrites fail or Plex cannot update metadataCheck free space and container logs; verify the configured user can write to appdata.
Interrupted shutdownProblem follows a power loss or forced stopCompare the time of the first Plex error with Unraid shutdown and system logs.

1. Stop Plex and preserve appdata

In Unraid, open Docker, click the Plex container, and choose Stop. Then use your configured appdata backup method, or copy the Plex appdata directory to separate storage while the container remains stopped. Confirm the backup contains the Plex data directory and database files before making changes. Do not run a repair against the only copy.

2. Check disk health and Unraid logs

Open Main in the Unraid web interface and inspect the disks used for appdata and media. Review their SMART reports, then open Tools > System Log and search around the time Plex reported corruption for I/O, filesystem, or device errors. A SMART warning or repeated read/write errors points to storage that needs attention; resolve that before restoring a database, or corruption may return.

3. Verify appdata location and free space

In Docker, select Plex and choose Edit. Inspect the host path mapped to the container’s Plex configuration directory; its exact container path depends on the image. Confirm the host path is the intended appdata location, has free space, and is on a healthy local cache or pool when practical. If appdata is on the array or remote storage, consider moving it to a suitable local pool using Unraid’s supported mover and share settings, with Plex stopped. The fix is confirmed when Plex’s appdata writes succeed without new storage errors.

4. Check container path mappings and permissions

In the Plex container’s Edit screen, confirm the configuration or appdata mapping points to the existing Plex data directory, rather than a new or unintended folder. Check the container logs for permission or read-only filesystem messages. Use the ownership and permission approach recommended for your specific Plex image; do not apply a blanket recursive permission change to the whole array. Plex should start with the expected library and be able to update metadata without permission errors.

5. Stop competing jobs and avoid abrupt shutdowns

Temporarily pause scheduled backups, mover activity, or other heavy jobs that overlap with the appdata device, then reproduce the issue with Plex running alone. Stop Plex from the Docker page before maintenance or planned shutdowns, and use a UPS if power interruptions are common. If corruption stops when storage contention or abrupt power loss is addressed, keep monitoring logs through a library scan and normal restart.

6. Check and repair the database from a backup copy

With Plex stopped, make a second copy of the database files from the Plex appdata directory and use Plex’s documented database repair procedure for your installed version. Do not guess which database file to replace or run SQLite repair commands against live files. Compare the repaired copy with Plex logs and a library scan; success means Plex opens the database without reporting corruption. If repair fails, restore a known-good backup rather than repeatedly modifying the same files.

7. Restore a clean backup and monitor

If repair does not work, stop Plex and restore the most recent known-good Plex appdata backup using the backup tool’s restore process. Start the container and check its logs, library sections, and watched status. A clean start followed by a scan and restart without another database error confirms recovery; if corruption returns, investigate the underlying disk, filesystem, or appdata path before restoring again.

FAQ

Why does my Plex database keep getting corrupted on Unraid?

Repeated corruption often means the storage or filesystem problem is still present, or Plex appdata is being interrupted during writes. Check SMART reports, Unraid system logs, free space, and whether appdata is on a healthy local pool. Restoring a backup alone will not fix a persistent storage fault.

Where is the Plex database stored on Unraid?

It is inside Plex’s appdata directory, at the host path mapped to the container’s configuration directory. Find that host path in Docker > Plex > Edit; the exact directory layout varies by container image and configuration.

Can I repair the Plex database while Plex is running?

No. Stop the Plex container first and work on a separate copy of the database files. Use the repair procedure documented for your Plex version, and preserve an untouched backup in case the repair fails.

Once Plex completes a scan and restart without database errors, keep a recent appdata backup and monitor Unraid logs for storage faults. If the problem persists, preserve the logs and database copy, then investigate the affected disk or filesystem before rebuilding the library.

Photo: Trique303 / CC BY-SA 4.0 (Wikimedia Commons)

Leave a Comment

Immich Thumbnails Broken After Update: Rebuild Guide

Immich Thumbnails Broken After Update: Rebuild Guide

Fix the immich thumbnail error loading image after an update by checking storage, permissions, and jobs, then safely rebuild missing thumbnails in Immich.

Plex Database Corruption on Unraid: Root Cause Guide

Plex Database Corruption on Unraid: Root Cause Guide

Fix plex database keeps getting corrupt unraid by checking storage health, filesystem errors, write access, and Plex’s database before restoring a clean backup.

Pi-hole Not Answering DNS: Upstream and Port Checks

Pi-hole Not Answering DNS: Upstream and Port Checks

Fix pihole not responding to dns requests by checking client settings, port 53 conflicts, Pi-hole’s DNS service, upstream reachability, and firewall rules.

CasaOS Merge Storage Not Working: Disk and fstab Fixes

CasaOS Merge Storage Not Working: Disk and fstab Fixes

Fix casaos merge storage not working by checking disk mounts, mergerfs, permissions, app paths, and fstab conflicts on your self-hosted server.

Nextcloud Snap Stuck in Maintenance Mode: Safe Fix

Nextcloud Snap Stuck in Maintenance Mode: Safe Fix

Nextcloud Snap stuck in maintenance mode? Check background jobs, disk space, and snap logs, then safely identify and clear the maintenance flag.

Immich Error Loading Image: Thumbnail and EXIF Fixes

Immich Error Loading Image: Thumbnail and EXIF Fixes

Fix immich error loading image after upload by checking thumbnail jobs, storage permissions, image files, and EXIF processing in your self-hosted Immich server.

Jellyfin Container Stuck Restarting: Compose Debug Guide

Jellyfin Container Stuck Restarting: Compose Debug Guide

Fix jellyfin container stuck on restarting in Docker Compose: inspect logs, verify config volume permissions, correct mounts, and isolate common startup failures.

Jellyfin Error Opening File for Writing: Permissions

Jellyfin Error Opening File for Writing: Permissions

Fix jellyfin error opening file for writing by checking the Jellyfin service account, media mount permissions, container UID/GID, and storage health.

TrueNAS SCALE Stuck on Welcome to GRUB: Boot Fixes

TrueNAS SCALE Stuck on Welcome to GRUB: Boot Fixes

Fix truenas scale stuck on welcome to grub by checking boot media, firmware mode, pool health, and boot environments before attempting a careful reinstall.

Unraid Docker execution error 403: Appdata Permissions

Unraid Docker execution error 403: Appdata Permissions

Fix unraid docker execution error 403 by checking appdata ownership, container paths, Docker settings, and Unraid’s web session before changing permissions.