app/vmselect: log the total available memory for concurrent requests on not enough memory errors

This should simplify root cause analysis
This commit is contained in:
Aliaksandr Valialkin 2020-07-20 19:51:00 +03:00
parent ad6290953c
commit b9c8f6bf34

View file

@ -686,9 +686,10 @@ func evalRollupFuncWithMetricExpr(ec *EvalConfig, name string, rf rollupFunc,
if !rml.Get(uint64(rollupMemorySize)) { if !rml.Get(uint64(rollupMemorySize)) {
rss.Cancel() 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; "+ 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; "+ "possible solutions are: reducing the number of matching time series; switching to node with more RAM; "+
"increasing -memory.allowedPercent; increasing `step` query arg (%gs)", "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)) defer rml.Put(uint64(rollupMemorySize))