From cf8c171f857d317f68d716058c0c0a5bdaa121bb Mon Sep 17 00:00:00 2001 From: Michael Fuller Date: Mon, 22 Nov 2021 03:20:42 -0700 Subject: [PATCH] vmselect: in promql evaluation, return bytes requested when rollup memory limiter is unable to satisfy the request (#1838) Co-authored-by: Michael Fuller --- app/vmselect/promql/eval.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/vmselect/promql/eval.go b/app/vmselect/promql/eval.go index f4ac9dc786..bd00a4a68e 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -729,9 +729,10 @@ func evalRollupFuncWithMetricExpr(ec *EvalConfig, funcName string, rf rollupFunc rss.Cancel() return nil, fmt.Errorf("not enough memory for processing %d data points across %d time series with %d points in each time series; "+ "total available memory for concurrent requests: %d bytes; "+ + "requested memory: %d bytes; "+ "possible solutions are: reducing the number of matching time series; switching to node with more RAM; "+ "increasing -memory.allowedPercent; increasing `step` query arg (%gs)", - rollupPoints, timeseriesLen*len(rcs), pointsPerTimeseries, rml.MaxSize, float64(ec.Step)/1e3) + rollupPoints, timeseriesLen*len(rcs), pointsPerTimeseries, rml.MaxSize, uint64(rollupMemorySize), float64(ec.Step)/1e3) } defer rml.Put(uint64(rollupMemorySize))