Avoid Typesense resource usage explosion after multiple face-merges #3861
Closed
raisinbear
started this conversation in
General
Replies: 2 comments
-
If anyone is facing the same issue in Kubernetes, then try to remove the Readiness liveness probe until the service is done with queuing completely, and the issue controller keeps restarting the service. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Closing since typesense has been removed in #3605 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
initially, I opened #3799 for that, but I slowly got to understand things are a little more complicated and this is not exactly a bug:
What I and some others describe happens for me only when performing multiple face merges in a row. And observing more closely, I think "in a row" is limited to doing another face merge (or any Typesense import) during the time it takes to reindex all faces again - a step that @alextran1502 informed me was necessary after face merge shortly after I created the issue.
So from what I understand and gather by the error logs posted in the issue, reading the code and (very small parts) of the typesense docs:
infra.config.ts
, lines 48 in current main) and tries again after 4s (same file, line above)3600s
, although they don't explicitly mention, why. I got a suspicion, though, that at least some of the information from the attempted imports are saved to the then ever-growing log folder.So I simply tried
3600
instead of10
. I think it meansmicroservices
won't give up after10 s
but will rather stand in line until typesense is ready to accept import commands again. I can now merge 5-6 or more faces (didn't have more right now ^^ but before, I could completely crash my server with only 3) in a row with 4400 faces total without seeing any errors in the logs, without typesense raft log folder growing from60 M
to>4 G
, without Typesense keeping the CPU busy for almost an hour (now 1-2 minutes for 6 face merges) and thrashing my SSD with gigabytes of writes, and without the eventual and more or less final503: Not Ready or Lagging
fromimmich_server
which would from time to time render immich unusable.However, I don't know what else this setting is doing or if there are any downsides to it.
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions