app/vmselect: improve logging when the incoming query cannot be executed because of timeout in the wait queue

This commit is contained in:
Aliaksandr Valialkin 2023-01-11 01:06:05 -08:00
parent 675e0fa0ee
commit f7130d571d
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
2 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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)