Frequent DB corruption

Server Version#: 1.25.4.5426

I have noticed that the com.plexapp.plugins.library.db file gets corrupted fairly frequently on my system. The PMS folder is on the same disk, not mounted over the network or anything. Yesterday, I ran the PRAGMA check on the db and it was fine. Today when I run the check, I get these errors:

$ sudo "/usr/lib/plexmediaserver/Plex SQLite" com.plexapp.plugins.library.db "PRAGMA integrity_check"
*** in database main ***
Page 45216: btreeInitPage() returns error code 11
Page 45215: btreeInitPage() returns error code 11
Page 45214: btreeInitPage() returns error code 11
Page 45213: btreeInitPage() returns error code 11
Error: database disk image is malformed

The “repairing a corrupt DB” section in the Plex guide does not help (see below):

$ sudo "/usr/lib/plexmediaserver/Plex SQLite" com.plexapp.plugins.library.db ".output recover.out" ".recover"
$ sudo "/usr/lib/plexmediaserver/Plex SQLite" com.plexapp.plugins.library.db "PRAGMA integrity_check"   
*** in database main ***
Page 45216: btreeInitPage() returns error code 11
Page 45215: btreeInitPage() returns error code 11
Page 45214: btreeInitPage() returns error code 11
Page 45213: btreeInitPage() returns error code 11
Error: database disk image is malformed

Has anyone else run into this? It’s really annoying to have this corruption happen so often…

If this is happening frequently…
can you verify if there’s a potential issue where the database might be running out of space or getting shut down while writing?

Your drive might be dyeing with bad sectors. Might run some disk checks utilities and do a Smart check.

1 Like

You were right, I checked the syslog and there were some ext4 errors. Interesting thing is that it’s only this VM (among 4 others) that is experiencing this issue.

Oh, that’s not good. That is a good indication that the drive is slowly failing. I would recommend you get a new drive and clone it right away so you don’t loose any more data or create issues with the VM data.

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