EPG (Guide Data) Not Showing - Database Error on fresh install

Server Version#: 1.29.2.6364-6d72b0cf6
Docker Container: linuxserver/plex
Player Version#: N/A
Tuner Make/Model: HDHomeRun FLEX 4K
Guide/Lineup name:
Using XMLTV?: No

When running the refresh guide, the debug logs show that the database cannot be swapped out due to an error. This is on a fresh install of Plex using the docker container image:

See below.

Dec 11, 2022 11:01:44.935 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, database corruption at line 66843 of [1b256d97b5]
Dec 11, 2022 11:01:44.935 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, database corruption at line 66993 of [1b256d97b5]
Dec 11, 2022 11:01:44.935 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, statement aborts at 10: database disk image is malformed
Dec 11, 2022 11:01:44.935 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, database disk image is malformed in “PRAGMA cache_size=2000”
Dec 11, 2022 11:01:44.937 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, database corruption at line 66843 of [1b256d97b5]
Dec 11, 2022 11:01:44.937 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, database corruption at line 66993 of [1b256d97b5]
Dec 11, 2022 11:01:44.937 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, statement aborts at 10: database disk image is malformed
Dec 11, 2022 11:01:44.937 [0x7f2115a80b38] ERROR - [Req#11cf] SQLITE3:0x80000001, 11, database disk image is malformed in “select * from metadata_items limit 1”
Dec 11, 2022 11:01:44.937 [0x7f2115a80b38] ERROR - [Req#11cf] EPG: We caught an exception trying to swap out the database: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=2000

You’ve three choices:
a) repair the database
b) restore from a backup
c) delete it and start over

If you choose the last option you will have to re-create your libraries. Your media is not touched.

Click on the links above to see directions on repairing or restoring.

Also, check out @ChuckPA’s database repair utility posted on GitHub. It is easier than typing in the SQLite commands yourself.

Sorry I forgot to mention that this is the output from a clean install. I have also went through the process of database repair to no avail. Every time I refresh the guide, it gives this error.

I thought you were updating to a new release.

If a completely new install, with no pre-existing database, libraries, etc, try deleting the Plex database.

  1. Stop Plex Media Server
  2. Navigate to the Plex Data Folder → Plug-in Support → Databases
  3. Delete all the files in the Databases folder
  4. Restart Plex Media Server

If the database is still corrupted, then something is wrong with the installation.


If there is a pre-existing database, then use the repair utility.

Depending on how things are configured, uninstalling Plex Media Server does not necessarily remove the Plex Data Folder, where the database is located.

It is possible a pre-existing db was corrupt, but Plex could still run.

When updating to a new release, Plex may also update how the db is organized. If the db was already corrupt, the update may fail, and cause additional problems or Plex may even refuse to run.

Basically, there are degrees or db corruption. If only slightly corrupted, it may not yet be noticeable. However, updating to a new release may push things over the edge, necessitating the db repair process.

I’ve went through these processes before. The one difference I can think of from a previous install is that I’m storing the plex database on a Samba share. My previous installation used a path on the local virtual machine. I’ll test this to see if it makes a difference.

The db is on a different system, accessed via SMB or NFS?

That will lead to database corruption.

See Linux Tips: Plex’s metadata on a network share. (Advanced users only)

You might be able to use iSCSI, since it appears as a local drive to the system. I’ve no experience with iSCSI, so don’t know how well it works (or doesn’t).

This was 100% my problem. I switched the mount point to a local path on the VM and it works perfectly. I wasted 3 days trying to figure this out. Too bad Plex doesn’t use a different database instead of SQLITE. Thanks for your micro-journey helping me figure this out.

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