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.



9 Replies
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 🙂
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?
it could be files that are not supported yet
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.
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
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.

there is an environment variable to set I believe
IMMICH_ASSUME_YES
Ah you can add --yes
to the commandWow! that is awesome!! I will try it now