Strange behaviour: immich upload --import via CLI of 72335 photos and videos

I followed instructions and ran this command (1st run) : immich upload --key <my-api-key> --server http://my-server-ip:2283/api /mnt/media/photos --recursive --import After 1 hour I got some Errors in JSON format (screenshot 1). I decided to run the import command again hoping to import the files from the same folder that were not imported due to errors (2nd run): - it detected 920 assets that are not in Immich and I confirmed the import I decided to give it a 3rd run just to make sure I have imported all of the photos and videos from the above folder: - it detected 132 assets that are not in Immich and I confirmed the import I decided to give it a 4th run just to make sure I have imported all of the photos and videos from the above folder: - it detected 132 assets that are not in Immich and I confirmed the import I decided to give it a 5th run just to make sure I have imported all of the photos and videos from the above folder: - it detected 148 assets that are not in Immich and I confirmed the import I gave up and came for help here. Meanwhile when I check Jobs page in admin dashboard I also see some strange behaviour. So I have in total 72335 photos and videos, but the number of thumbnails is more than this number and it keeps increasing. I expected this number to go down from 72335.
No description
No description
No description
9 Replies
Alex Tran
Alex Tran•2y ago
the job count doesn't need to match with the number of assets For example, for thumbnail generation job, there are jpeg and webp jobs included The error was probably due to CPU is being used entirely in microservices and machine learning to it blocks the incoming requests. You can limit CPU usage of the microservices and machine learning to help overcome this request timeout issue 🙂
andreessenhorowitz
andreessenhorowitzOP•2y ago
Thank you so much for answers Alex! Do you have any idea why the CLI --import command always detect same 132 assets as being new although they are already imported previously?
Alex Tran
Alex Tran•2y ago
it could be files that are not supported yet
andreessenhorowitz
andreessenhorowitzOP•2y ago
Alex, sorry for bothering you again. I'm a typical newbie 🙂 What will happen if I delete some of the folder/photos from the earlier -imported library? Will Immich detech their deletion and automatically remove them from the Immich database/timeline or I will need to manually find all of them and remove from Immich? I'm just thinking to generate .JPG proxy photos from my .ARW raw files now, import them to Immich and then after CLI will support raw files I will remove proxy .JPG files and import RAW files instead.
Alex Tran
Alex Tran•2y ago
Right now it doesn’t have the ability to detect them. Import or uploaded files are both going through Immich’s pipeline of generating thumbnail files, encoding videos…etc
andreessenhorowitz
andreessenhorowitzOP•2y ago
Got it! Im gonna wait for RAW support via CLI I have another question. Is there any way to override the --import prompt with 'y' by default and to import library without asking this question? I'm trying to connect Alexa voice assistant to run Immich CLI import command, but this prompt is breaking the flow.
andreessenhorowitz
andreessenhorowitzOP•2y ago
No description
Alex Tran
Alex Tran•2y ago
there is an environment variable to set I believe IMMICH_ASSUME_YES Ah you can add --yes to the command
andreessenhorowitz
andreessenhorowitzOP•2y ago
Wow! that is awesome!! I will try it now

Did you find this page helpful?