From aa94652ec39ecdf37ba534a3f3daf7dfc3a84d9a Mon Sep 17 00:00:00 2001 From: "cubic-dev-ai[bot]" <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:49:11 +0200 Subject: [PATCH] app/vminsert: correctly stop StopIngestionRateLimiter before vminsert.Stop in vmsingle shutdown vmsingle shuts down vminsert before closing the ingestion rate limiter, even though the rate limiter API explicitly requires the opposite order to unblock callers. vminsert.Stop() waits for unmarshal workers, which can be blocked in ingestionRateLimiter.Register() when the limit is hit. --- app/victoria-metrics/main.go | 2 +- docs/victoriametrics/changelog/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/victoria-metrics/main.go b/app/victoria-metrics/main.go index 1d85ba85dd..04e7003c29 100644 --- a/app/victoria-metrics/main.go +++ b/app/victoria-metrics/main.go @@ -118,8 +118,8 @@ func main() { logger.Fatalf("cannot stop the webservice: %s", err) } logger.Infof("successfully shut down the webservice in %.3f seconds", time.Since(startTime).Seconds()) - vminsert.Stop() vminsertcommon.StopIngestionRateLimiter() + vminsert.Stop() vmstorage.Stop() vmselect.Stop() diff --git a/docs/victoriametrics/changelog/CHANGELOG.md b/docs/victoriametrics/changelog/CHANGELOG.md index a96ec4da23..2f1cf1cfb0 100644 --- a/docs/victoriametrics/changelog/CHANGELOG.md +++ b/docs/victoriametrics/changelog/CHANGELOG.md @@ -27,6 +27,7 @@ See also [LTS releases](https://docs.victoriametrics.com/victoriametrics/lts-rel ## tip * BUGFIX: [vmagent](https://docs.victoriametrics.com/victoriametrics/vmagent/): fix `ec2_sd_configs` returning 401 `AuthFailure` from AWS when credentials are obtained via IRSA, instance role or `AWS_CONTAINER_CREDENTIALS_*` env vars. The regression was introduced in [v1.140.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.140.0). See [#10815](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10815). +* BUGFIX: [vmsingle](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/): properly execute graceful shutdown for vmsingle if `-maxIngestionRate` is configured. * BUGFIX: [vmrestore](https://docs.victoriametrics.com/victoriametrics/vmrestore/): fix an issue where vmrestore could hang indefinitely when interrupted during backup download. ## [v1.140.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.140.0)