prometheus: Getting "query processing would load too many samples" error for simple count(metric) query

What did you do? Run count(metric) for metric with high number of series (200k) over 1h range in Prometheus UI.

What did you expect to see? Result.

What did you see instead? Under which circumstances? Instant query returns 208040, but trying to create graph (using Prometheus Graph tab) for range as low as 10 minutes fails with error saying Error executing query: query processing would load too many samples into memory in query execution.

Running Prometheus version: 2.18.1, ecee9c8abfd118f139014cb1b174b08db3f342cf, with query.max-samples=50000000.

Screenshot 2020-05-21 at 17 56 51

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (22 by maintainers)

Most upvoted comments

That’d be a significant rewrite of PromQL, which would likely increase memory and cpu usage for common queries which’d be kinda self-defeating. If you need to work with high-cardinality series like this you should use recording rules.