From e35c9124b77ac3705ec0a7043bcde3f175f4d1df Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 18 Mar 2022 16:42:13 +0200 Subject: [PATCH] lib/storage: reduce the interval for checking for free disk space from 30 seconds to 1 second This should reduce the probability of out of disk space panics when -storage.minFreeDiskSpaceBytes is set to low values. Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2305 --- docs/CHANGELOG.md | 1 + lib/storage/storage.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index e7815b06e6..6db6148d33 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -24,6 +24,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * BUGFIX: [Graphite Render API](https://docs.victoriametrics.com/#graphite-render-api-usage): return an additional point after `until` timestamp in the same way as Graphite does. Previously VictoriaMetrics didn't return this point, which could result in missing last point on the graph. * BUGFIX: properly locate series with the given `name` and without the given `label` when using the `name{label=~"foo|"}` series selector. Previously such series could be skipped. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2255). Thanks to @jduncan0000 for discovering and fixing the issue. * BUGFIX: properly free up memory occupied by deleted cache entries for the following caches: `indexdb/dataBlocks`, `indexdb/indexBlocks`, `storage/indexBlocks`. This should reduce the increased memory usage starting from v1.73.0. See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2242) and [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2007) issue. +* BUGFIX: reduce the interval for checking for free disk space from 30 seconds to 1 second. This should reduce the probability of `no space left on device` panics when `-storage.minFreeDiskSpaceBytes` is set to too low values. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2305). ## [v1.74.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.74.0) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 9561d597e8..f387cb931f 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -635,7 +635,7 @@ func (s *Storage) startFreeDiskSpaceWatcher() { s.freeDiskSpaceWatcherWG.Add(1) go func() { defer s.freeDiskSpaceWatcherWG.Done() - ticker := time.NewTicker(30 * time.Second) + ticker := time.NewTicker(time.Second) defer ticker.Stop() for { select {