Seems I managed to get a corrupt sqlite database, and after going through the steps on how fix that (Repair a Corrupt Database | Plex Support), I now get: Failed to commit transaction (..\Library\MetadataItem.cpp:5052) (tries=1): Cannot commit transaction. database disk image is malformed whenever I try to update any metadata.
The server seems to come up just fine, and I can start watching stuff, but concerned that the problem really isn’t fixed, and I’ll just start having more issues down the road.
Unzip the file and open the Plex Media Server.log file with a text editor/reader.
Look for error messages indicating database corruption, such as those containing ERROR - SQLITE3 or ERROR - Database corruption. Some examples:
Jul 05, 2020 19:36:56.959 [0x7f59f1b85740] ERROR - SQLITE3:(nil), 11, database corruption at line 64817 of [bf8c1b2b7a]
Jul 05, 2020 19:36:56.959 [0x7f59f1b85740] ERROR - SQLITE3:(nil), 11, statement aborts at 10: [select max(max(metadata_items.changed_at),max(metadata_items.resources_changed_at)) from metadata_items] database disk image is malformed
Jul 05, 2020 19:36:56.978 [0x7f59f1b85740] ERROR - Database corruption: sqlite3_statement_backend::loadOne: database disk image is malformed
If the database is corrupt, you’ve three choices: repair, restore from a backup, or delete & start over.
If you delete the database you will have to re-create your libraries and re-share them with any users. Your media is not touched during the process.
If you’ve a backup of the database you can try restoring it. If the backup is not corrupt, you can then re-scan your libraries to pick up any additions since the date of the backup.
You can also try repairing the database. You will need to be comfortable with using Terminal and the command line for this option.
These support articles have additional information:
I did the second “Repair a Corrupt Database”, however I am still getting messages about a corrupt database, which seems wrong since they were just recreated.
Using the Repair a Corrupt Database did not seem to work, however, restoring the database from 10 days ago did. I had more recent backups, but decided to roll back 10 days because it was easy enough and I didn’t want to have to rollback again (further). System is busy, but content plays, and metadata is editable again, so problem solved.