diff --git a/app/vmselect/main.go b/app/vmselect/main.go index e7656ecfd0..956a297891 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -209,6 +209,13 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool { timerpool.Put(t) qt.Printf("wait in queue because -search.maxConcurrentRequests=%d concurrent requests are executed", *maxConcurrentRequests) defer func() { <-concurrencyLimitCh }() + case <-r.Context().Done(): + timerpool.Put(t) + remoteAddr := httpserver.GetQuotedRemoteAddr(r) + requestURI := httpserver.GetRequestURI(r) + logger.Infof("client has cancelled the request after %.3f seconds: remoteAddr=%s, requestURI: %q", + d.Seconds(), remoteAddr, requestURI) + return true case <-t.C: timerpool.Put(t) concurrencyLimitTimeout.Inc()