SqliteError: code SQLITE_READONLY

Why?

If you’re seeing errors at startup due to a “SQLITE_READONLY” error, it’s most likely due to the user that PhotoStructure is running as not having write permission to the databases*, or if a SQLite database is not stored on local disk.

Due to the way SQLite runs, it doesn’t support concurrent writes to remote filesystems.

* PhotoStructure actually uses two databases:

  1. a library database (stored in $library/.photostructure/models/db.sqlite3), and
  2. a database that sync uses to maintain state between runs, which is stored in /ps/tmp/sync-state-XXX (where XXX is a SHA to disambiguate concurrent library paths).

Solution

  1. Ensure the user that is running PhotoStructure has read/write/execute permissions to both the libraryDir (/ps/library on Docker) and cacheDir (/ps/tmp on Docker).

  2. Ensure /ps/tmp is bind-mounted to a local, fast filesystem

If you still see issues, please reply to this topic and we’ll get it sorted out!