SQLLite Error: Corrupt Database

Hey there, new user to PhotoStructure. Just learned about it today via Reddit thread, did some research, and decided to install it on our Synology NAS using the new container manager (was Docker).

The install went great, it started importing files from my library, and when i checked back after an hour or so, I was greeted with this message. Any recommendations for getting it fixed?

Thanks!
Greg

{“toast”:{“text”:“Well, darn, that didn’t work”,“uuid”:“SqliteError: SQLITE_CORRUPT: database disk image is malformed”,“details”:“SqliteError: SQLITE_CORRUPT: database disk image is malformed”,“type”:“warning”,“button1Text”:“Return home”,“button1Url”:“/tag#dismiss”,“button1Class”:“info”,“onClickUrl”:“#dismiss”}}

I may have posted too soon, but will leave this here in case its helpful to others. After restarting the container, it now loads without the error. So perhaps it found and fixed the issue on startup. I can add more if I see the problem occur again.

Thanks!

Welcome to PhotoStructure, @Greg_Spence !

Make sure you’re using the alpha tag—I’ve made a bunch of stability improvements especially with SQLite.

Also, it’s not gas-lighting you: when the container restarts, it does a bunch of validation steps, and if the db doesn’t seem happy, follows a series of steps to perform recovery. Check the health page for details, but if there are any issues with the library database, they’ll show up there.

Also make sure the container is configured to shut down gracefully (with something like --stop-timeout 120). PhotoStructure tries to clean up and shut down as expeditiously as it can, but those steps can take 10-30 seconds (depending on library size and disk speed). Details are on the docker page:

Thanks for the reply. I’m on 2.1 Alpha 7. I see the health stats on the about page now, although this wasn’t accessible with the error.

I’m fairly new to docker and manual configuration, but I’ll take a look at the stop timeout data and see if its not right. But it should be whatever the default it.

Greg

Please pull the newer alpha version: v2023.11 should avoid the corrupt SQLite issue compared to v2.1

Hey there, I got the image updated to 2023.11, but it doesn’t seem to continue scanning the library. Its been stuck on /ps/library Processing, about 9 minutes remain, for about 5 hours now. I also haven’t seen the number of assets increasing. Any ideas?

Thanks!

try “restart sync” (not that this should be neccessary, but it might help)