Remove max heap usage monitoring

This commit is contained in:
Patrick O'Grady 2020-10-15 15:05:22 -07:00
parent c960310ed7
commit 61ddb31e87
No known key found for this signature in database
GPG key ID: 8DE11C985C0C8D85
2 changed files with 3 additions and 5 deletions

1
go.sum
View file

@ -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=

View file

@ -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)