Sync won't complete with SQLite errors (2023.12.0-alpha.7)

Hi! I’m a Plus subscriber running PhotoStructure for Node 2023.12.0-alpha.7 on Ubuntu 22.04.4 LTS on x64. Everything is on a local 2TB drive with 1TB free. PhotoStructure, Samba, and Cockpit are the only things on the server.

The PhotoStructure install was uneventful (awesome instructions; thank you). The initial sync completed two of three source directories, but won’t finish the third. I asked it to auto-organize the library, and it’s created 38,493 assets from 116,231 image files and 552 video files. There are 5,289 tags.

I check in on sync progress every day or so, and it’s consistently reported around 20 hours remaining for a couple of weeks.All health checks are OK. SQLite says it’s OK, too:

  • embedded: version 3.44.2
  • /home/photostructure/photostructure-for-servers/tools/linux-x64/sqlite3: version 3.42.0

In the meantime, the web server generally runs well, and I’m able to view, delete, and rotate photos in the web UI. But I do get frequent errors while rotating photos (not sure if they’re related, so I’ll just mention here): (1) the preview image will appear to be rotated correctly, but moving to a different photo and then back to the original photo will instead show the original/incorrect orientation…further rotations will turn the image too far in the intended direction, suggesting that it’s actually rotating but the preview is not updating; or (2) the preview image will appear to rotate correctly, but then immediately snap-back/redraw in the original/incorrect orientation…further rotations here also cause over-rotations.

The major problem, though, is the failure to complete the sync/import and the errors in the logs. The logs contain many instances of this:

2024-03-17T21:35:34.686Z web-3743 error_ db.SQLite .throw() quick_check failed for /home/photostructure/PhotoStructure/.photostructure/models/db.sqlite3: "unable to validate the inverted index for FTS5 table main.tag_fts: database is locked" { stack:
   'Error: quick_check failed for /home/photostructure/PhotoStructure/.photostructure/models/db.sqlite3: "unable to validate the inverted index for FTS5 table main.tag_fts: database is locked"\n    at new g (/home/photostructure…for-servers/bin/web.js:9:155661)' }

Also, there are quite a few instances of this, though not nearly as many as the above SQLite errors:

2024-03-17T00:51:06.952Z web-3743 warn_ event.SharedState(/home/photostructure/PhotoStructure/.photostructure/shared-state)#3743 failed to resolve task before timeout (see sharedStateTaskTimeoutMs) { task:
   { uid: '1jt4xyz36-b35xd3n',
     name: 'repairAsset',
     args: [ { assetId: 16342, forceSync: false, forceRebuildPreviews: false } ] },
  sharedStateTaskTimeoutMs: 300000 }
2024-03-17T00:51:06.953Z web-3743 warn_ async.Deferred(repairAsset) settled multiple times (already rejected) { value: null }

Please let me know if additional logging would help. I saw the SQLite error discussed in some other forum posts, but I didn’t find a recommended solution.


Welcome to PhotoStructure, @damonbrinson ! Thanks for your patronage!

The current prealpha build (which I should be able to promote to alpha status tomorrow) should solve some of those sync, rotation, and db issues. More details are in the release notes: PhotoStructure | 2024 PhotoStructure release notes

I’ll review your issues tomorrow when I’m back to my desk and if there’s anything you found amiss that I haven’t already think is addressed I’ll give an update (I may need more system configuration details or debug logging to understand the issue and reproduce on my test rigs).