mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +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 := &httpserver.ErrorWithStatusCode{
|
||||||
Err: fmt.Errorf("couldn't start executing the request in %.3f seconds, since -search.maxConcurrentRequests=%d concurrent requests "+
|
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; "+
|
"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",
|
"to increase -search.maxQueueDuration=%s; to increase -search.maxQueryDuration; to increase -search.maxConcurrentRequests",
|
||||||
d.Seconds(), *maxConcurrentRequests),
|
d.Seconds(), *maxConcurrentRequests, maxQueueDuration),
|
||||||
StatusCode: http.StatusServiceUnavailable,
|
StatusCode: http.StatusServiceUnavailable,
|
||||||
}
|
}
|
||||||
httpserver.Errorf(w, r, "%s", err)
|
httpserver.Errorf(w, r, "%s", err)
|
||||||
|
|
|
@ -520,9 +520,9 @@ func (s *Server) processRPCWithConcurrencyLimit(ctx *vmselectRequestCtx, rpcName
|
||||||
s.concurrencyLimitTimeout.Inc()
|
s.concurrencyLimitTimeout.Inc()
|
||||||
return fmt.Errorf("couldn't start executing the request in %.3f seconds, since -%s=%d concurrent requests "+
|
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; "+
|
"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,
|
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)
|
err := s.processRPC(ctx, rpcName)
|
||||||
|
|
Loading…
Reference in a new issue