Upgraded to alpha, Photostructure won't start

Welcome to PhotoStructure, @jho, sorry it was misbehaving for you!

The error you’re seeing happens if the container isn’t shut down gracefully. PhotoStructure has to do a bunch of things on shutdown:

https://photostructure.com/faq/how-to-start-and-stop-photostructure/#why-does-it-take-so-long-to-shut-down

  • Verifying and repacking the library database.
  • Taking a backup of the library database.
  • Cleaning the cat box and changing the linens.
  • Copying the local database replica back to your library, if your library is on a remote filesystem.
  • Shutting down any external service processes (like sync-file and exiftool)
  • Closing and compressing logfiles.
  • Removing library opened-by lockfiles.

The last step is removing the opened-by lockfiles: if those are still present, something prior didn’t finish: which could be the database janitorial work.

So: the simplest solution is to

  1. Shut down your container

  2. Make sure you’re using -alpha.2 (or later). -alpha.1 had a shutdown bug (apologies!)

  3. Make sure you’ve configured your container to have a long shutdown wait time. The docker arg is --stop-timeout 120.

  4. Remove the lockfiles manually (replace /ps/library/ with the actual path to your library):

rm /ps/library/.photostructure/opened-by/*.json
  1. Restart your container

Hope this addresses it!