Smart search doesnt work on my new immich installation (Docker, Synology)
Hi, my new installation of immich can't use smart search. I get the following error "Failed to search smart (immich server error)".
I suspect it comes down to these lines in my server logs:
[Nest] 17 - 05/28/2025, 3:39:30 PM WARN [Api:MachineLearningRepository~hp22bg8p] Machine learning request to "http://immich-machine-learning:3003" failed with status 500: Internal Server Error
[Nest] 17 - 05/28/2025, 3:39:30 PM ERROR [Api:ErrorInterceptor~hp22bg8p] Unknown error: Error: Machine learning request '{"clip":{"textual":{"modelName":"ViT-B-32__openai","options":{"language":"en-US"}}}}' failed for all URLs
My Immich-LEARNING is configured as follows IMMICH_MACHINE_LEARNING_URL http://immich-machine-learning:3003
I've also attached both container's logs.
Any ideas what I did wrong? I've tried many options I found online.
80 Replies
:wave: Hey @echan42,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time).
2. :blue_square: read applicable release notes.
3. :blue_square: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: uploaded the relevant information (see below).
7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.How much ram does your Synology have?
Thanks for the quick response


You’re getting a permission denied error when it tries to save the model to the model cache. Are you using docker compose? If so, could you share your yml file?
That was my first suspicion so I chmod777'd my immich folder maybe foolishly
Let me find the yaml file
docker composer is my frontend to manage stacks, right? I'm using portainer
This is the guide I used https://mariushosting.com/how-to-install-immich-on-your-synology-nas/
Marius Hosting
How to Install Immich on Your Synology NAS
Trustworthy expert guide to your Synology NAS.
Oh, I’ve never used portainer. Are you running as non-root? This issue is similar to what another user was facing and they were non-root on k8s. The download library we use changed how it works recently and we haven’t figured out what specifically causes the permission error yet. My guesses are the relevant folders (inside the container, not on the host) are
/cache
, /tmp
, maybe ~/.cache
I'm running portainer using their local administrator account, I believe this admin account interacts with the only user I have on my Synology, this user has full admin access
I've set full read write modify for all folders and files in this directory but I don't see /tmp or /.cache


I pulled my local admin's account's uid and gid
And gave them to portainer when deploying
Hmm it’d be good to figure out which folder it’s failing to write to. Can you ssh/exec into a shell session in the ML container? You can try seeing if you can
touch
a file into /cache
. I can also do some digging today see what the library is doingI'm sorry if this is ignorant, but what container is ML?

Ah right, machine learning, gotcha

Is this the right "/cache/" folder?
Are the local unix caché folder the same folder that immich is trying to use?
I'm sorry, I have unix server knowledge but I'm not familiar with container enviroments
Yes, this is the same environment that the machine learning process is under
Did you pay Marius for the stack.env? 👀
Yeah, $5 got the job done, I value their contribution but I'd have prefered not having to "donate"
I just mean that they provide support as well, tailored to the compose
I have my reservations towards paywalling knowledge but using their guide saved me time
I'll hit them up requesting some help, I hadn't tought of that
If you get there ,ask about the matplotlib
I've always wondered what that was about
Will get back to you with that
(My guess is it's to somehow weed out the non-paying users 😛 )
How would that work?
somehow
Guessing the MPLOTLIBDIR var is a token of some kind
I've sent them an email but I don't want to prod too hard regarding the matplotlib, if I get a response I'll ask them in a follow-up
Sure thing
Could you
ls -la /cache /tmp
meanwhile?
From inside the containerOn it

Could this be my issue?

did you try to chmod /cache too?
Yep, no issues I can change permissions on /cache
I think /cache/ is owned by you because it's mounted
Maybe you can add the tmp volume
I'm not sure how to mount additional volumes, but you're right, tmp may be missing

it's not missing FWIW, it doesn't exist in 'normal' deployments
in the Stacks editor, just add tmp:
Updated and deployed, brb


Still no smart search

I can touch files to /tmp
Same error in the logs?
ML logs,
RuntimeError: Data processing error: I/O error:
Permission denied (os error 13)
Permission denied (os error 13)
Is this the error we're talking about? I didn't pinpoint the original error in the logs
or this error?
[Nest] 7 - 05/28/2025, 5:43:23 PM ERROR [Microservices:{"id":"d6bde133-b91a-43a6-a631-f48361e217bb"}] Unable to run job handler (smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed for all URLs
Yeah the big wall is the error I meant
I appreciate you patience here, I feel like I'm fumbling at every step
No, like mert said this might have been the result of some changes on our end and understanding why/how is important
I'm happy to cooperate with any request you may have
But my knowledge is limited here
Same! Going to be rude and tag @sogan 👀
They can be pretty busy though so, patience
I've got time but I'm not always on Discord, I'll keep an eye on this convo
I'm happy to provide VNC if it's of any help to asses if this is a result of any changes in immich
I'm aware that the main objective here is check if this is the result of any changes on your end and understanding, not fixing my server
So I'm not gonna nudge in the direction that's only convenient to e
me*
Oh no, we want to have both 😛
Understanding why it's erroring will also allow us to fix your issue
I'm willing for the focus to shift, just wanted to make that clear 🙂
Pretty sure you can just... download the model manually if you want to get it going
I'd be happy with that result if it doesn't impede any investigation you'd value
What model do you have defined in smart search?
ViT-B-32__openai
Came standard
I have a small folder on my drive that populated with deployment, this doesn't change things, right?

that's part of the model, yeah
bah it seems like hugginface download is not that straightforward
I mean it is, just not from web 😛
https://huggingface.co/immich-app/ViT-B-32__openai/tree/main
I actually landed on that page during my own troubleshooting, gave up since I didn't find a download button
Yeah from the web gui you'd need to either download all files individually and place them in their folders
or do a git clone
git clone https://huggingface.co/immich-app/ViT-B-32__openai
testing
git cloned the files and copying to /docker/immich/cache/clip/ViT-B-32__openai
For reference, this is the normal folder structure:
looks good! Fingers crossed
Not sure what is in
models--immich-app--ViT-B-32__openai
🤔 it's like 2 more folders, both emptyWorks!

I asked it for "car" and it gave me my car

This is amazing
I'm still around if there's testing to be done to find the source of the issue
Matplotlib could be used in custom scripts or projects involving Immich to analyze or visualize data related to photo/video libraries, such as metadata, storage usage, or tagging statistics.
For example, you might use Matplotlib to:
Plot the number of photos uploaded over time using Immich's API data.
Visualize storage usage across albums or libraries.
Create graphs of face recognition or tag distribution from Immich's metadata.
This was his response
I've been having problems too and have been working through them using ChatGPT to help me resolve. It has concluded the issue is likely a bug and related to a mismatch with Pydantic FastAPI schema. Screenshot attached.

I don't think it is 👀
Hi. I'm a new Immich user setting up and testing for the 1st time. I'm seeing this same problem as echan42 and same environment (Synology with Portainer). In GitHub, I see Issue #19431 (https://github.com/immich-app/immich/issues/19431) which also looks like the same problem. That Issue has been closed and moved to Discussion 3 days ago. What does being moved to a Discussion mean with regard to a fix/resolution?
One difference is that Issue #19431 log shows "Downloading detection model 'buffalo_1' prior to the error. But like echan42, I'm seeing "Downloading textual model 'ViT-B-32__openai' prior to the "ERROR Exception in ASGI application".
It looks like echan42 fixed their problem by "git cloning" that part of the model (5/28/2025 10:20AM in this thread). Is that the solution? (or just a temporary solution?)
[Issue] Immich-machine-learning container in portainer keeps giving permission denied when trying to download model evne though same permission is used for immich-server (immich-app/immich#19431)
Closing the issue means the issue is not with Immich
OK. Thanks.
@echan42 I did the "git clone ... ViT-B-32__openai" and copied it into the .../cache/clip folder. But unfortunately, I'm still getting a failure - slightly different. I'm curious if you had to do anything else to get it to work? Thanks.
Fwiw, immich works fine on Synology with the built in container manager, I know it's not exactly what you're looking for, but it is a solution
@Tempest Thanks. I see there is a docker-compose.yaml available in the Immich documentation. I had missed that. From your comment, I believe you realized that I installed Immich using Portainer. I think everything is working, except the machine-learning. If I interpret your comment correctly, you are suggesting the possibility that Portainer is potentially introducing the problem. I will take the docker-compose.yaml and start with that - using the container manager, instead of Portainer. (I just recently moved my few other containers into Portainer.) If I can get that working, then I have something that I can tweak and hopefully get to work in Portainer.
Thanks for the "gentle nudge." I do appreciate it. It got me to look in a different direction. I was stuck.
I'm successfully running immich on a ds423+ in the container manager using the official docker compose instructions (slightly modified to work with docker -compose instead of docker compose)
@Tempest I have a DS1621+. So, no hardware acceleration. But should be capable. I'll start with the official instructions. I had started with MariusHosting (just like the OP). But had also made modifications. Obviously, I did something wrong. Again, thanks.
@Tempest It all works (including machine-learning)! Cheers!
Hi, a very strong topic during my research was permissions, double check that the permissions are correct, including all sub-directories