You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typesense uses available memory stats to report it on typesense_memory_* metrics and for throttling writes with memory-used-max-percentage settings. But in docker container, where resource limits are set via cgroups, typesense reads the available memory stats from the host machine. It leads to OOM kills even with set up memory-used-max-percentage and incorrect metrics reporting.
The same issue is for Kubernetes environment with resources:limits: where nodes are usually huge servers.
Side note: it is also true for CPU count which is used to calculate default values for some settings, but IMO it is not so important.
The text was updated successfully, but these errors were encountered:
b0g3r
changed the title
Typesense reports and uses host machine memory stats when running in Docker
Typesense uses host machine memory stats when running in Docker
May 7, 2024
Description
Typesense uses available memory stats to report it on
typesense_memory_*
metrics and for throttling writes withmemory-used-max-percentage
settings. But in docker container, where resource limits are set via cgroups, typesense reads the available memory stats from the host machine. It leads to OOM kills even with set upmemory-used-max-percentage
and incorrect metrics reporting.The same issue is for Kubernetes environment with
resources:limits:
where nodes are usually huge servers.Side note: it is also true for CPU count which is used to calculate default values for some settings, but IMO it is not so important.
Steps to reproduce
https://gist.github.com/b0g3r/2fcf88772cddf4bd4630a48bc1d63073
The text was updated successfully, but these errors were encountered: