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

[Feature request] config parameter (or option) to limit max acceptable samples/size/lines in single scrape #4342

Closed
KevinAMurray opened this Issue Jul 3, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@KevinAMurray
Copy link

KevinAMurray commented Jul 3, 2018

Proposal

A config parameter, possibly global or even as command line option, but ideally for each target that specifies the maximum size (time series, data or lines would do) that is acceptable for a single scrape. If the target exceeds that value, the scrape is ignored. (e.g. if ContentLength is greater than a certain value, then the scrape is treated as failed.)

We have had OOM issues with scraping that have been caused by the target returning "too much" data. To have a bit more resilence it would be good to have prometheus "reject" metric where the volume returned is too large. (Whilst for some targets the time taken to generate the data causes a timeout which has the same effect, that is not always the case, especially if the timeout is deliberately set to a large value).

Occasionally we can identify the issue via alerts on scrape_samples_scraped, once the problem has been tripped, prometheus gets into a crash loop.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 3, 2018

You're looking for sample_limit.

@KevinAMurray

This comment has been minimized.

Copy link
Author

KevinAMurray commented Jul 3, 2018

Doh! Apologies -- never spotted that!

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.