cark
IImmich
•Created by cark on 4/30/2025 in #help-desk-support
Immich service periodically runs out of memory and stops during thumbnail generation
Hello - I have been using Immich for a while in my home server (Radxa Rock 5B 4GB) and it has been working mostly fine. However, I recently moved it over to an SSD, which seemed to go ahead correctly, until I started scanning an existing external library with about 800GB worth of pictures (mixed formats), approximately some 42k files.
The trouble comes when I scan these directories. Initially Immich would hog all the memory and freeze the system. That took a while to figure out and fix. Forcing resource limits in Compose (2GB for the immich service, 512MB for redis and postrgre respectively) stopped that, which let me bring down the thumbnail generation queues to just 2 and disabling ML.
The initial issue seemed to be because I mistakenly made the external library directory sit in the same place as the 'db' folder, which had quickly turned into a 15+ million file folder. I started with a fresh database and that took care of that, while also removing and pulling again all images. So I figured, let's start the import process again, from the right directory this time and disable all memory limits as well as resetting the queue settings to defaults. That seemed to work well, until after a few minutes the server froze again and Immich was consuming all available memory again.
In order to get some resemblance of performance again I have had to reintroduce the aforementioned memory limits to the Compose file and lowered the thumbnail generation queues back to 2. If I give it more memory it'll end up hogging it all and crashing the box, if I increase the queues it'll hit the memory limit and the immich service will crash (show an unknown version on the web UI), start all over again, hit the memory limit again, crash, rinse and repeat. With only these two queues it seems to take much longer to get into this cycle, even though it does happen.
Any ideas?
34 replies