Docker crashes immediately on start

So I made some changes and now it won’t start, yeah I know…but the db appears to be locked, how do I unlock it?

Error: Library is already opened by d7a6159a8fda (main:17) /ps/library/.photostructure/opened-by/cfxykr0-17.json (library setup)¹⁶²"}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Library is already opened by d7a6159a8fda (main:17) /ps/library/.photostructure/opened-by/cfxykr0-17.json (library setup)¹⁶²
    at A.throwIfUnavailable (/ps/app/bin/main.js:9:645947)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /ps/app/bin/main.js:9:625093

Is there a lock file somewhere?

This has happened to me in the past. I’m not sure WHY it’s happening to you now, but you can fix it by deleting any files in the library/.photostructure/opened-by folder.

This is indeed the answer: but make sure you’re not actually running it in another process. The latest version of the opened-by lockfiles should be fairly resilient to crashes and hostname changes, so if they are still “valid”, it’s because there’s another active PhotoStructure instance running.

Note that the lockfiles auto-expire after several minutes.

Also: if you hit this error regularly, know that PhotoStructure isn’t being shut down gracefully.

Make sure your docker command includes this switch:

--stop-timeout 120

Thanks! Marked as solved. That was indeed my issue.

Thanks for the reminder to ensure things are kept clean