Skip to content
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

Typesense uses host machine memory stats when running in Docker #1715

Open
b0g3r opened this issue May 7, 2024 · 0 comments
Open

Typesense uses host machine memory stats when running in Docker #1715

b0g3r opened this issue May 7, 2024 · 0 comments

Comments

@b0g3r
Copy link

b0g3r commented May 7, 2024

Description

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.

Steps to reproduce

https://gist.github.com/b0g3r/2fcf88772cddf4bd4630a48bc1d63073

@b0g3r 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant