PromQL query with longer time range causes internal server error
Just a simple up query works for a time range up to 4 weeks. Picking a larger time range causes a server returned HTTP status 500 Internal Server Error
prometheus log:
caller=engine.go:493 component="query engine" msg="error selecting series set" err="server returned HTTP status 500 Internal Server Error"
m3coordinator log:
ERROR unable to fetch data {"rqID": "88df6b2d-548f-4b30-afb7-5537b06cfcc1", "error": "no clusters can fulfill query"}
Prometheus: 2.3.2 M3Coordinator: 0.4.1 (running on the same host as prometheus) M3DB: 0.4.1 (4 node cluster, 2 replicasets of 2 nodes each with 3 seednodes) Prometheus config: read_recent: true
The m3db namespace was initialised with: retentionPeriodDuration": "720h"
Which is about 4 weeks... So I am guessing it has something to do with the error.
I expect to just get all the results that m3db has. Basically the same idea when I only have 1 day of data stored in a namespace with a retention of 2 weeks, requesting 2 weeks of data returns just the data for the 1 day, it doesn't throw an error because there is no data for the entire time range.
@sboschman Are you saying that with the 720h retention you can successfully query for about 4 weeks of data, but when you select a larger time range you get the error? Could you provide the exact time ranges you were using?
@nikunjgit Maybe m3coordinator issue?
Yes, that is about right @richardartoul
The retention just popped to mind while typing the issue. Just did some additional queries, and it fails right at the retention limit.
up{job="node-exporter", instance=~".*m3db.*"} OK
up{job="node-exporter", instance=~".*m3db.*"}[8h] OK
up{job="node-exporter", instance=~".*m3db.*"}[2w] OK
up{job="node-exporter", instance=~".*m3db.*"}[4w] OK
up{job="node-exporter", instance=~".*m3db.*"}[8w] FAIL
up{job="node-exporter", instance=~".*m3db.*"}[24d] OK
up{job="node-exporter", instance=~".*m3db.*"}[29d] OK
up{job="node-exporter", instance=~".*m3db.*"}[30d] FAIL
up{job="node-exporter", instance=~".*m3db.*"}[719h] OK
up{job="node-exporter", instance=~".*m3db.*"}[720h] FAIL
Yeah, I see where the issue is. Will put something up to fix
Hey, I put up a PR to address this issue. Basically we were supporting only queries that are fully covered by retention of the cluster namespaces.
Now we will start to enable heuristics to best effort reduce which namespaces we query based on retention of the query and continue to de-dupe the response as best as possible (until we have central index support): https://github.com/m3db/m3/pull/908