From e9f5dfdc548d7e0cb50331e81ddc23a3cda5e5e5 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Thu, 25 Oct 2018 18:37:57 +0200 Subject: [PATCH] Prolong the period of computation of DB stats to approx 24 hours --- blockbook.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blockbook.go b/blockbook.go index a9627290..3ff1ac56 100644 --- a/blockbook.go +++ b/blockbook.go @@ -20,7 +20,6 @@ import ( "syscall" "time" - // "github.com/erikdubbelboer/gspt" "github.com/golang/glog" "github.com/juju/errors" ) @@ -469,7 +468,7 @@ func storeInternalStateLoop() { var computeRunning bool lastCompute := time.Now() // randomize the duration between ComputeInternalStateColumnStats to avoid peaks after reboot of machine with multiple blockbooks - computePeriod := 9*time.Hour + time.Duration(rand.Float64()*float64((2*time.Hour).Nanoseconds())) + computePeriod := 23*time.Hour + time.Duration(rand.Float64()*float64((4*time.Hour).Nanoseconds())) lastAppInfo := time.Now() logAppInfoPeriod := 15 * time.Minute glog.Info("storeInternalStateLoop starting with db stats recompute period ", computePeriod)