From 71eba8dcf5297e9b4ff9ee539d5ba82cebc6d6cc Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 20 Jul 2020 19:51:00 +0300 Subject: [PATCH] app/vmselect: log the total available memory for concurrent requests on `not enough memory` errors This should simplify root cause analysis --- 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 1c2836f84..feed1f29c 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -697,9 +697,10 @@ func evalRollupFuncWithMetricExpr(ec *EvalConfig, name string, rf rollupFunc, if !rml.Get(uint64(rollupMemorySize)) { 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; "+ "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, float64(ec.Step)/1e3) + rollupPoints, timeseriesLen*len(rcs), pointsPerTimeseries, rml.MaxSize, float64(ec.Step)/1e3) } defer rml.Put(uint64(rollupMemorySize))