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

exit gracefully if not enough memory #23

Open
sed-i opened this issue Sep 30, 2021 · 2 comments
Open

exit gracefully if not enough memory #23

sed-i opened this issue Sep 30, 2021 · 2 comments

Comments

@sed-i
Copy link
Contributor

sed-i commented Sep 30, 2021

When I try to generate 100k metrics on a 1G VM, avalanche hangs and dies.
Also the log messages are delayed by ~1 min, i.e. don't really match the printed timestamp.

./cmd --metric-count=100000 --label-count=10 --series-count=10 --value-interval=10 --series-interval=36000 --metric-interval=36000 --port=9001
Serving ur metrics at localhost:9001/metrics
2021-09-30 21:35:44.801681073 +0000 UTC m=+30.791942268: refreshing metric values
2021-09-30 21:35:54.83536445 +0000 UTC m=+40.825625685: refreshing metric values
Killed
@bill3tt
Copy link
Contributor

bill3tt commented Oct 7, 2021

How would you suggest we exit gracefully? There is no data / state that is lost if the process is OOM killed.

@sed-i
Copy link
Contributor Author

sed-i commented Oct 7, 2021

There are two decision points I can think of:

  1. exit right away if the expected memory is more than available (excluding swap)
  2. exit if actual refresh rate exceeds value-interval

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

2 participants