I
Immich2y ago
Mavor

thumbnails are missing after “Generate Thumbnails” “All” job finished

Thumbnails were regenerated overnight but not all. “Missing” button has no effect. On web ui, “regenerate thinmbnail” on each missing thumbnail, fixes that single one broken, but there are a lot of them, so it’s not practical. iPhone ui doesn’t even have that option. Please help
12 Replies
bo0tzz
bo0tzz2y ago
Are there any errors in the containers' logs?
Mavor
MavorOP2y ago
There might be some timeout errors, let me filter out for a single thumbnail and I will post it here
/api/asset/file/e00a6da8-8c4b-4e10-98b0-148d3bcffb21?isThumb=false&isWeb=true

Response:
{"statusCode":500,"message":"Internal server error"}

immich_server logs:
[Nest] 8 - 08/31/2023, 5:30:18 PM ERROR [AssetService] Cannot create read stream for asset e00a6da8-8c4b-4e10-98b0-148d3bcffb21
getAssetThumbnail
[Nest] 8 - 08/31/2023, 5:30:19 PM ERROR [AssetService] Cannot create read stream for asset f3880dd1-b4f2-4552-b68c-e15e383f2b7b
getAssetThumbnail
[Nest] 8 - 08/31/2023, 5:30:20 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, access 'upload/thumbs/d59d3ce9-c503-4514-86f7-4c4273a9a8de/e00a6da8-8c4b-4e10-98b0-148d3bcffb21.jpeg'
Error: ENOENT: no such file or directory, access 'upload/thumbs/d59d3ce9-c503-4514-86f7-4c4273a9a8de/e00a6da8-8c4b-4e10-98b0-148d3bcffb21.jpeg'
/api/asset/file/e00a6da8-8c4b-4e10-98b0-148d3bcffb21?isThumb=false&isWeb=true

Response:
{"statusCode":500,"message":"Internal server error"}

immich_server logs:
[Nest] 8 - 08/31/2023, 5:30:18 PM ERROR [AssetService] Cannot create read stream for asset e00a6da8-8c4b-4e10-98b0-148d3bcffb21
getAssetThumbnail
[Nest] 8 - 08/31/2023, 5:30:19 PM ERROR [AssetService] Cannot create read stream for asset f3880dd1-b4f2-4552-b68c-e15e383f2b7b
getAssetThumbnail
[Nest] 8 - 08/31/2023, 5:30:20 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, access 'upload/thumbs/d59d3ce9-c503-4514-86f7-4c4273a9a8de/e00a6da8-8c4b-4e10-98b0-148d3bcffb21.jpeg'
Error: ENOENT: no such file or directory, access 'upload/thumbs/d59d3ce9-c503-4514-86f7-4c4273a9a8de/e00a6da8-8c4b-4e10-98b0-148d3bcffb21.jpeg'
bo0tzz
bo0tzz2y ago
So the file that it expects doesn't exist Any errors in the microservices container when you ran the jobs?
Mavor
MavorOP2y ago
I wasn't able to find those logs. I discovered that my .yml file was outdated and I had to recreate containers, so logs are lost now I would imagine that "Missing" button would go and search missing files on disk, but apparently it doesn't really do that
bo0tzz
bo0tzz2y ago
It bases it on the database entries, which are wrong in your case The easiest option would probably be to regenerate all thumbnails
Mavor
MavorOP2y ago
We are going in circles 🙂 That's how the problem actually started
bo0tzz
bo0tzz2y ago
Try running it again but this time getting the logs so you can see the errors it generates ;)
Mavor
MavorOP2y ago
That's promising, lol. I would imagine there is bad error handling somewhere in the code which does thumbnails generation. Database update and file creation isn't atomic/transactioned
bo0tzz
bo0tzz2y ago
Correct, that's an issue we have in a few places. There is error handling in place, but if things go wrong enough there's not a lot we can do
Mavor
MavorOP2y ago
Maybe some kind of database consistency tool would be useful
bo0tzz
bo0tzz2y ago
That is something we'd like to add at some point, yea
Mavor
MavorOP2y ago
Basically run file existence / validity on all records which reference those files

Did you find this page helpful?