From 61ddb31e87cc036aa49ec9c242cc75dd77e300cd Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Thu, 15 Oct 2020 15:05:22 -0700 Subject: [PATCH] Remove max heap usage monitoring --- go.sum | 1 + main.go | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.sum b/go.sum index b445c5c..fb3ffec 100644 --- a/go.sum +++ b/go.sum @@ -316,6 +316,7 @@ github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/sjson v1.1.1 h1:7h1vk049Jnd5EH9NyzNiEuwYW4b5qgreBbqRC19AS3U= github.com/tidwall/sjson v1.1.1/go.mod h1:yvVuSnpEQv5cYIrO+AT6kw4QVfd5SDZoGIS7/5+fZFs= +github.com/tidwall/sjson v1.1.2 h1:NC5okI+tQ8OG/oyzchvwXXxRxCV/FVdhODbPKkQ25jQ= github.com/tidwall/sjson v1.1.2/go.mod h1:SEzaDwxiPzKzNfUEO4HbYF/m4UCSJDsGgNqsS1LvdoY= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= diff --git a/main.go b/main.go index 89a7f3d..d5f83f0 100644 --- a/main.go +++ b/main.go @@ -51,10 +51,6 @@ const ( // idleTimeout is the maximum amount of time to wait for the // next request when keep-alives are enabled. idleTimeout = 30 * time.Second - - // maxHeapUsage is the size of the heap in MB before we manually - // trigger garbage collection. - maxHeapUsage = 8500 // ~8.5 GB ) var ( @@ -143,7 +139,7 @@ func main() { g, ctx := errgroup.WithContext(ctx) g.Go(func() error { - return utils.MonitorMemoryUsage(ctx, maxHeapUsage) + return utils.MonitorMemoryUsage(ctx, -1) }) var i *indexer.Indexer @@ -161,6 +157,7 @@ func main() { bitcoin.OperationTypes, false, []*types.NetworkIdentifier{cfg.Network}, + nil, ) if err != nil { logger.Fatalw("unable to create new server asserter", "error", err)