-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Machine learning memory leak #3142
Comments
How much ram in MB/GB is it actually using? We can't do much with just a percentage. |
@weber8thomas which version were you running before you updated? |
Now its consuming 17%, 1.25 GB / 7.63 GB but ive seen it consuming almost 6gb / 8gb |
I was running 1.65.0 |
I don't think anything unusual is happening here - ML is expected to use quite a bit of RAM while processing is running, and after a bit of inactivity the models will be unloaded and the RAM usage will go down. |
The point is that no processes are running (CPU between 0 & 1% on docker stats) and no jobs listed on the admin dashboard of the WEB UI. So that's why this is unusual compare to the previous versions. |
Running a cronjob for it shouldn't cause an issue. I think model unloading is causing a memory leak. The first time they're unloaded you can see a small decrease, but the next time RAM usage swells up further. |
Same here. 27%, 2.05 GB / 7.63 GB |
Is there a way to disable machine learning. IMMICH_MACHINE_LEARNING_URL=false and removing machine learning container didnt seem to help as immich server kept crashing. |
That memory usage is completely normal.
Could you share the logs for the server? |
Ok, I thought the container is supposed to unload the models once it is idle based on the discussion above. Is there a documentation on how to switch off machine learning. Thanks.. |
Model unloading is currently disabled by default since it can cause a memory leak. As for disabling machine learning, the steps you mention are all that should be needed. If the server is crashing, I'd need to see the logs to help you. |
If the models are not unloading, can the model with machine learning mean it can keep increasing ? I am not sure if it's the same issue with model loading or something else. |
Models are loaded on-demand now, so the container will have lower RAM usage until then. Models won't be unloaded after this by default, though. RAM usage can also vary based on the images sent and the number of concurrent requests. |
The bug
yacht dashboar is showing that immich_machine_learning is consuming between 20%-60% of ram
The OS that Immich Server is running on
Debian
Version of Immich Server
v1.66.1
Version of Immich Mobile App
v1.66.0
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
sudo docker-compose pull && sudo docker-compose up -d
Additional information
No response
The text was updated successfully, but these errors were encountered: