From f7130d571d3c4fdef3a542177b45b459d18a9922 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 11 Jan 2023 01:06:05 -0800 Subject: [PATCH] app/vmselect: improve logging when the incoming query cannot be executed because of timeout in the wait queue --- app/vmselect/main.go | 4 ++-- lib/vmselectapi/server.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index bf98ce5e9d..8605444d9a 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -212,8 +212,8 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool { err := &httpserver.ErrorWithStatusCode{ Err: fmt.Errorf("couldn't start executing the request in %.3f seconds, since -search.maxConcurrentRequests=%d concurrent requests "+ "are executed. Possible solutions: to reduce query load; to add more compute resources to the server; "+ - "to increase -search.maxQueueDuration; to increase -search.maxQueryDuration; to increase -search.maxConcurrentRequests", - d.Seconds(), *maxConcurrentRequests), + "to increase -search.maxQueueDuration=%s; to increase -search.maxQueryDuration; to increase -search.maxConcurrentRequests", + d.Seconds(), *maxConcurrentRequests, maxQueueDuration), StatusCode: http.StatusServiceUnavailable, } httpserver.Errorf(w, r, "%s", err) diff --git a/lib/vmselectapi/server.go b/lib/vmselectapi/server.go index 6d391371bc..f824269f36 100644 --- a/lib/vmselectapi/server.go +++ b/lib/vmselectapi/server.go @@ -520,9 +520,9 @@ func (s *Server) processRPCWithConcurrencyLimit(ctx *vmselectRequestCtx, rpcName s.concurrencyLimitTimeout.Inc() return fmt.Errorf("couldn't start executing the request in %.3f seconds, since -%s=%d concurrent requests "+ "are already executed. Possible solutions: to reduce the query load; to add more compute resources to the server; "+ - "to increase -%s; to increase -%s", + "to increase -%s=%d; to increase -%s", d.Seconds(), s.limits.MaxConcurrentRequestsFlagName, s.limits.MaxConcurrentRequests, - s.limits.MaxQueueDurationFlagName, s.limits.MaxConcurrentRequestsFlagName) + s.limits.MaxQueueDurationFlagName, s.limits.MaxQueueDuration, s.limits.MaxConcurrentRequestsFlagName) } } err := s.processRPC(ctx, rpcName)