mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
app/vmselect: improve logging when the incoming query cannot be executed because of timeout in the wait queue
This commit is contained in:
parent
675e0fa0ee
commit
f7130d571d
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue