#Smart search stops working after changing ML from remote machine back to default URL

1 messages · Page 1 of 1 (latest)

ebon zenith
#

Had a prior thread about my Immich setup - server is running on a very underpowered PC with only 4gb RAM, and therefore couldn't use any of the ML abilities because immich_machine_learning stopped the workers due to lack of memory. I therefore set up remote machine learning on a more powerful computer, and it worked flawlessly: I was able to crunch through my test photos, smart search worked well, and no errors in the logs.

I then changed my machine learning URL back to default: http://immich-machine-learning:3003, but after that, I no longer had smart search functionality. My immich_machine_learning container shows the same error logs as before, claiming lack of memory:

                             to memory                                          
[11/21/24 17:55:56] INFO     Setting execution providers to                     
                             ['CPUExecutionProvider'], in descending order of   
                             preference                                         
[11/21/24 17:56:52] ERROR    Worker (pid:46) was sent SIGKILL! Perhaps out of   
                             memory?                                            
[11/21/24 17:56:55] INFO     Booting worker with pid: 59   ```

immich_server shows the same error logs as before as well:
```[Nest] 33  - 11/21/2024, 5:56:59 PM   ERROR [Api:ErrorInterceptor~wrztai27] Unknown error: Error: Machine learning request to "http://immich-machine-learning:3003" failed with SocketError: other side closed
Error: Machine learning request to "http://immich-machine-learning:3003" failed with SocketError: other side closed
[Nest] 33  - 11/21/2024, 5:57:00 PM     LOG [Api:EventRepository] Websocket Disconnect: uKmxBXS3unGBjhmTAAAD```

Does smart search only work if there's a capable machine learning instance that it can utilize?
gilded streamBOT
#

:wave: Hey @ebon zenith,

Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich immich.

References

Checklist

  1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: I have read applicable release notes.
  3. :ballot_box_with_check: I have reviewed the FAQs for known issues.
  4. :ballot_box_with_check: I have reviewed Github for known issues.
  5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
  7. :ballot_box_with_check: I have 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)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

ebon zenith
#

I saw from a different thread that some ML data gets stored in postgres, but does this only work if I had enough memory to query it (not fully sure how the machine learning works/stores data/parses search terms, so apologize if I'm misunderstanding this)? Does this mean that the only way I could get smart search to work is if my remote machine is on and accessible 24/7?

crude jolt
#

Running a smart search requires an available ML instance, since it needs to convert your text query into a vector embedding. After that, the rest of the search is all in postgres

ebon zenith
#

That makes a lot of sense. I also attempted adding this to my .env: MACHINE_LEARNING_WORKER_TIMEOUT=300 to see if that could help, but didn't seem like it did. Can changing this variable help with insufficient RAM at all, and give more time for RAM to load the model?

crude jolt
#

The error message isn't a timeout, it likely is just getting killed because there's not enough ram straight up