Generated by
go run ./cmd/configdocfrom the flags incmd/proxy/main.goand the registry ininternal/config. Do not edit by hand.
Errors and alerts index
What a client error or a firing alert means, which limit produced it, and how to change that limit.
Errors​
| Response | Limit that produced it | What to do |
|---|---|---|
400 limit reached while evaluating the query (the class of Loki's query limits); the request error log line names limit_flag=-binary-metric-max-arrays, and its upstream_error says binary expression exceeds its evaluation budget; narrow the query or increase -binary-metric-max-arrays | -binary-metric-max-arrays | Raise it together with -binary-metric-max-operand-bytes; both bound one request's peak allocation. Default 2000000. |
400 limit reached while evaluating the query (the class of Loki's query limits); the request error log line names limit_flag=-binary-metric-max-operand-bytes, and its upstream_error says binary expression exceeds its evaluation budget; narrow the query or increase -binary-metric-max-operand-bytes | -binary-metric-max-operand-bytes | Raise it for wide binary expressions over many series; the bytes are held in proxy memory for the request. Default 268435456. |
400 limit reached while evaluating the query (the class of Loki's query limits); the request error log line names limit_flag=-multi-tenant-max-fanout and limit_value, and its upstream_error says multi-tenant fanout exceeds limit of N tenants; raise -multi-tenant-max-fanout or query fewer tenants | -multi-tenant-max-fanout | Each tenant in the list is a separate backend query, so this multiplies every other limit. Raise it only with matching VictoriaLogs capacity. Default 64. |
400 limit reached while evaluating the query (the class of Loki's query limits; Loki has no equivalent flag, so the text carries none); the request error log line names limit_flag=-manual-range-metric-row-limit and limit_value, and its upstream_error says manual range metric row limit exceeded (N); narrow the query or increase -manual-range-metric-row-limit, with ; the query matches M log lines for the count precheck and (N stats rows in one bucket grid) for the window stats path. The same answer covers a without aggregation, which reads a series per stream before it folds them, when it holds more series than this limit and the limit is not below the tenant's effective max_query_series (-max-stats-query-series, or the tenant's own override; below it, that series limit is the bound and Loki's series message answers); its upstream_error says metric result over the raw-row budget of a request that folds its series; narrow the query or increase -manual-range-metric-row-limit. On the chunked extraction-list windows only a single step whose window holds more series than this limit answers it, with (N series in the window of one step); a single step whose stats pass the 64 MiB body bound answers Loki's message-size error (500 ResourceExhausted, the log line naming -backend-max-buffered-response-bytes) | -manual-range-metric-row-limit | Proxy memory is about 100 bytes per stats row and about 32 bytes per raw sample, so the default bounds one evaluation to roughly 100 MiB. Raise it for high-cardinality groupings over days; lower it to reject expensive scans earlier. On the chunked extraction-list windows a lower value does not reject: it makes the chunks smaller (more VictoriaLogs calls, each reading the range before its chunk again) and lowers the proxy memory one chunk holds. Default 1000000. |
400 max entries limit per query exceeded, limit > max_entries_limit_per_query (L > N) (Loki's text); with -max-entries-limit-per-query-cap the limit is lowered to N instead | -max-entries-limit-per-query | Raise it for clients that ask for more log lines per request; lower it towards Loki's 5000 to bound response size. Grafana asks for its Max lines setting (1000 by default), well below the default. Default 10000. |
400 maximum number of series (N) reached for a single query; consider reducing query cardinality ... (Loki's text); a Logs Drilldown request gets 200 with N series (chosen by -drilldown-series-limit-mode) and the warning maximum number of series (N) reached for a single query; returning partial results | -max-stats-query-series | The default is 1,000, above Loki's 500: the proxy answers faster than Loki, so it affords more series per query, and Logs Drilldown gets 1,000 series with the partial-result warning instead of 500. Set 500 (or max_query_series 500 in the tenant limits) to match Loki. Raise it for dashboards that legitimately render thousands of series, at the cost of response size and browser rendering; topk and bottomk rank every series regardless of this cap. Raise -backend-max-buffered-response-bytes with it: this cap is what usually keeps a result inside the byte budget, so raising it alone converts Loki's series-limit error into Loki's message-size error (rpc error: code = ResourceExhausted ...; the log line names -backend-max-buffered-response-bytes). Budget about 40 bytes per sample plus about 100 bytes per series - series x steps x 40 bytes - so 64 MiB holds roughly 1,500 dense series over a 1,000-step range. The 1,000 default over 1,000 steps is about 40 MB, inside the 64 MiB default; at more than about 1,600 steps a full 1,000-series result needs -backend-max-buffered-response-bytes raised with it (or a lower cap). On the e2e stack sum by (pod) (rate({service_name="api-gateway"}[5m])) over 7d covers about 240,000 distinct pods: with a cap of 500 it answered 491 series in 0.5s, and at 1,000,000 it exceeds 64 MiB and returns 500. Default 0. |
400 parse error : input size too long (N > M) (Loki's text for a query above its input size limit; M is this limit); the request error log line names limit_flag=-max-query-length-bytes and limit_value | -max-query-length-bytes | Lower it to reject generated queries earlier; raising it above Loki's own limit has no effect, because Loki's parse error fires first. Default 131072. |
400 query planning took longer than the limit (the proxy's own text: Loki has no such limit); the request error log line names limit_flag=-max-query-plan-time and limit_value (nanoseconds) and says which check noticed it. Nothing of the request is kept: its validation, plan and translation are not stored, and a repeat plans again | -max-query-plan-time | 10s is above the slowest planning work measured, with the reasoning in the registry decision query-complexity-limits (as of 2026-11-18, commit 8e80a32b7, Apple M5 Pro, GOMAXPROCS=4, go test -v -run TestPlanBudgetDefaultNeverTripsOnTheCorpus ./internal/proxy, with LVP_PLAN_TIME_DEEP=1 for the deep shapes): the slowest of the 2,708 plan corpus queries plans in 0.4 ms; of the deep shapes Loki accepts, 26,000 nested sum( calls at 130 KB take 3.3 s on a quiet host, 6.2 s under load and 5.0 s under -race, all of it in the string translator (its validation takes 4 ms), and the other deep shapes take under 0.1 s. A follow-up moves the translation of nested vector aggregations onto the query plan, after which the default comes down. 10s is a twelfth of -backend-timeout (120 s). Lower it (1-5 s) to cut off abusive queries sooner: a real dashboard query plans in under a millisecond. Default 10s. |
400 query too complex: nesting too deep (the proxy's own text, with no number: Loki has no such limit); the request error log line names limit_flag=-max-query-nesting-depth and limit_value, and its upstream_error says how deep the query is | -max-query-nesting-depth | The default refuses nothing Loki accepts. Real queries nest a few levels (the deepest of the 2,585 valid queries of the plan corpus is 8). Lower it (50-100) to refuse generated queries before the proxy plans and translates them; it does not bound the parse. Default 0. |
400 query too complex: too many nodes (the proxy's own text, with no number: Loki has no such limit); the request error log line names limit_flag=-max-query-ast-nodes and limit_value, and its upstream_error says how many nodes the query has | -max-query-ast-nodes | The default is Loki's own bound (nothing below the input size limit), so no query Loki accepts is refused. Set it only to refuse generated or abusive queries before the proxy plans and translates them: real dashboard queries stay far below 1,000 nodes (the largest of the 2,585 valid queries of the plan corpus has 21). It is a bound on what follows the parse, not on the parse. Default 0. |
400 the query time range exceeds the limit (query length: X, limit: Y) | -default-max-query-length | 721h is Loki's default: a client gets Loki's answer for a range longer than about 30 days. Raise it, or set 0, when users query a longer retention; per-tenant limits in -tenant-limits override it. Default 721h0m0s. |
429 too many outstanding requests (Loki's queue-full text) with Retry-After: 5; the request error log line names limit_flag=-max-concurrent and limit_value | -max-concurrent | Size it with replica CPU and VictoriaLogs capacity; 0 disables admission entirely, which lets one client drive unbounded fanout. Default 100. |
429 too many outstanding requests (Loki's text, with no flag in it); the log line names the flag that closed the door as limit_flag | -backend-heavy-query-queue-wait | Keep it below the Grafana data source timeout (30s by default) so a queued panel fails with the documented 429 instead of a client timeout. Raise it when dashboards have more heavy panels than slots; lower it to shed load earlier. Default 20s. |
429 too many outstanding requests (Loki's text, with no flag in it); the request error log line names the flag as limit_flag=-backend-max-concurrent-heavy-queries with its value as limit_value, and its upstream_error says heavy VictoriaLogs queries are limited to -backend-max-concurrent-heavy-queries=N per replica and this query waited -backend-heavy-query-queue-wait=D | -backend-max-concurrent-heavy-queries | VictoriaLogs lets each stats pipe of one query use up to 40% of -memory.allowedPercent, so 2 keeps concurrent stats state inside its budget. Raise it with VictoriaLogs memory (the fleet total is replicas x this value); lower it to 1 for a VictoriaLogs under 2 GiB. Default 2. |
429 too many outstanding requests (Loki's text, with no flag in it); the request error log line names the flag as limit_flag=-backend-max-concurrent-metadata-scans with its value as limit_value, and its upstream_error says long-range VictoriaLogs metadata scans are limited to at most -backend-max-concurrent-metadata-scans=N per replica (adaptive limit L, floor -backend-min-concurrent-metadata-scans=F[, VictoriaLogs running C of S selects][, VictoriaLogs /metrics not answering][, VictoriaLogs memory P% used with R% reserved by this replica's scans against -backend-metadata-scan-memory-headroom=H]) and this query waited -backend-heavy-query-queue-wait=D; a background inventory refresh that finds the limiter closed is skipped (outcome skipped) and retried on its next schedule instead | -backend-max-concurrent-metadata-scans | What one scan costs depends on the data, so each replica learns the limit instead of being sized: on the e2e stack (7-day retention, 18 million rows) a 7-day stream_field_names scan holds 0.8 GiB and took 9-35 s alone, and seven at once from seven replicas each ran past VictoriaLogs' 60 s limit and OOM-killed it, while a backend with cheap scans lets the limit reach the ceiling. Because others' selects count against it, the limit bounds the fleet, not one replica: a simulation of eleven replicas warming up together stays under the memory budget where a static 2 each kills the backend. Raise the ceiling only for a VictoriaLogs with many cores and memory to spare; lower it to cap how many long scans any replica starts. 0 disables the limiter. Default 8. |
500 rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (N vs. LIMIT) (Loki's querier text above grpc_server_max_send_msg_size; N is the bytes read when the proxy stopped, or the size of the merged listing when the metadata inventory lists the values from time buckets: the cap bounds the listing, not each bucket response); the request error log line names limit_flag=-label-values-max-response-bytes and limit_value | -label-values-max-response-bytes | The VictoriaLogs response carries a hit count per value, so it is about 1.7x the Loki JSON answer: on the e2e stack pod values for {env="production"} are 2.4 MB from VictoriaLogs (1.4 MB of Loki JSON, 54,405 values) over 1h and grow with the window, about 53 MB for 24h. The 64 MiB default (the same per-response budget as -backend-max-buffered-response-bytes, 16x Loki's default message size) admits about 1.4 million such values, so a day of a high-churn label still answers, while Loki on the same stack already fails the 1h request. While an admitted response is decoded, indexed and encoded, proxy memory holds a small multiple of it (the body, the decoded values and the Loki JSON) per concurrent request. Lower it towards 4 MiB to fail where Loki's defaults would; raise it only with replica memory, since Grafana's label pickers cannot render lists of that size anyway. Default 67108864. |
500 rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (N vs. LIMIT) (Loki's text for a response above its message size); the request error log line names limit_flag=-ordered-json-metric-max-bytes and limit_value, and its upstream_error says ordered JSON metric response exceeds -ordered-json-metric-max-bytes; narrow the query or increase it | -ordered-json-metric-max-bytes | The default admits about one million rows of 1 KiB. Rows are streamed, so raising it costs VictoriaLogs scan work and network transfer rather than proxy memory; lower it to protect VictoriaLogs from long raw scans. Default 1073741824. |
500 rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (N vs. LIMIT) (Loki's text for a response above its message size; Loki's read API has no 413); the request error log line names limit_flag=-multi-tenant-max-merged-response-bytes and limit_value | -multi-tenant-max-merged-response-bytes | The merged body is held in proxy memory once per request; size it with -multi-tenant-max-fanout and replica memory. Default 33554432. |
500 rpc error: code = ResourceExhausted desc = grpc: trying to send message larger than max (N vs. LIMIT) (Loki's text for a response above its message size; N is the size seen when the proxy stopped reading, at least LIMIT+1), for a proxy-evaluated metric, a listing, a cold chunk or a decoded body; the request error log line names limit_flag=-backend-max-buffered-response-bytes and limit_value, and its upstream_error says manual metric response exceeds -backend-max-buffered-response-bytes; narrow the query or increase it (or backend response exceeds N bytes; narrow the query or increase -backend-max-buffered-response-bytes for a listing, a cold chunk or a decoded body; binary operand response, binary encoded response and binary expression output labels name the binary evaluator's buffers the same way); limit_value is the limit | -backend-max-buffered-response-bytes | Proxy memory grows with this value times the requests that buffer a response at once, so treat it as per-request memory: 64 MiB x -max-concurrent is the worst case. With -query-range-extent-cache on, a metric request whose stats answer is not cached yet also keeps one copy of it while it is read, for the cache to store split by split, so such a request can hold up to twice this value. Raise it for very wide stats responses; lower it on small replicas. It is the second half of -max-stats-query-series: the series cap decides how many series a result may carry, this decides whether the encoded result fits. Raising either one alone moves the failure rather than removing it - a high series cap with the default byte budget fails with Loki's message-size error (rpc error: code = ResourceExhausted ..., the log line names -backend-max-buffered-response-bytes) instead of the series-limit error. Size it as series x steps x 40 bytes for the widest chart you intend to serve, then check the replica has that much memory per concurrent request. Default 67108864. |
close frame 1011 Internal Server Error (Loki's text) once the window is spent; at once, whatever the window, for a failure no retry fixes: a row that is not JSON, a line above 1 MiB, a 4xx answer other than 429 (VictoriaLogs rejects the query) and a client that went away (no frame, the VictoriaLogs call is released). 0 closes on the first failed call. The window never changes what a client sees before the upgrade: a first probe that exceeds -backend-timeout is still answered with 504 | -tail.backend-retry-window | 30s covers a VictoriaLogs restart (seconds to tens of seconds until it answers again) and the switch of one replica behind a service during a rolling upgrade, which is what a tail has to ride out; Grafana's live view does not reconnect by itself, so a tail closed by a short restart stays blank until the user reopens it. Each waiting tail makes at most one VictoriaLogs call per 2.5 s once its wait reaches the 5 s cap (a poll or a reopen, 24 per minute at most), so tens of proxies with hundreds of tails each add a bounded load to a backend that is coming back, spread by the jitter, and a tail holds one goroutine and a few KiB while it waits (no rows are buffered). Raise it (2-5m) for a backend that restarts slowly or fails over; lower it, or set 0, where a client should learn of an outage at once or a front proxy already retries. Default 30s. |
| the same 429 as -backend-max-concurrent-metadata-scans, with the memory figures in the log line; background refreshes skip | -backend-metadata-scan-memory-headroom | 0.4 leaves 40% of VictoriaLogs' memory to its page cache (VictoriaLogs reads its parts through it), ingestion, the queries the proxy does not gate and scans whose memory is still building up; the memory in use already includes the caches VictoriaLogs is allowed (-memory.allowedPercent). On the e2e stack (8 GiB container, 3 GiB caches) 0.3 let memory in use reach 5.4 GiB and the resident set 5.7 GiB with eleven replicas starting together; the container also holds about a gigabyte of page cache. Raise it (0.5) when VictoriaLogs also serves other clients or runs close to its limit; lower it (0.2) on a dedicated node with a large limit. 0 disables the memory gate and the brake and leaves the latency, failure and select-slot feedback. A backend whose /metrics has no vl_concurrent_select series (a vmauth in front of VictoriaLogs) turns the memory gate off by itself: that process's memory says nothing about VictoriaLogs. Default 0.4. |
Alerts​
| Alert | Limits that can fire it |
|---|---|
| LokiVLProxyHighClientErrors | -manual-range-metric-row-limit, -max-stats-query-series, -max-entries-limit-per-query, -max-query-length-bytes, -max-query-ast-nodes, -max-query-nesting-depth, -max-query-plan-time, -default-max-query-length, -multi-tenant-max-fanout |
| LokiVLProxyHighErrorRate | -max-concurrent |
Alerts without a limit in this index (backend reachability, latency, memory, cache hit rate) report the health of the proxy or of VictoriaLogs, not a configured bound. See alerting.