Remove max heap usage monitoring
This commit is contained in:
parent
c960310ed7
commit
61ddb31e87
2 changed files with 3 additions and 5 deletions
1
go.sum
1
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/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 h1:7h1vk049Jnd5EH9NyzNiEuwYW4b5qgreBbqRC19AS3U=
|
||||||
github.com/tidwall/sjson v1.1.1/go.mod h1:yvVuSnpEQv5cYIrO+AT6kw4QVfd5SDZoGIS7/5+fZFs=
|
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/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/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=
|
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||||
|
|
7
main.go
7
main.go
|
@ -51,10 +51,6 @@ const (
|
||||||
// idleTimeout is the maximum amount of time to wait for the
|
// idleTimeout is the maximum amount of time to wait for the
|
||||||
// next request when keep-alives are enabled.
|
// next request when keep-alives are enabled.
|
||||||
idleTimeout = 30 * time.Second
|
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 (
|
var (
|
||||||
|
@ -143,7 +139,7 @@ func main() {
|
||||||
g, ctx := errgroup.WithContext(ctx)
|
g, ctx := errgroup.WithContext(ctx)
|
||||||
|
|
||||||
g.Go(func() error {
|
g.Go(func() error {
|
||||||
return utils.MonitorMemoryUsage(ctx, maxHeapUsage)
|
return utils.MonitorMemoryUsage(ctx, -1)
|
||||||
})
|
})
|
||||||
|
|
||||||
var i *indexer.Indexer
|
var i *indexer.Indexer
|
||||||
|
@ -161,6 +157,7 @@ func main() {
|
||||||
bitcoin.OperationTypes,
|
bitcoin.OperationTypes,
|
||||||
false,
|
false,
|
||||||
[]*types.NetworkIdentifier{cfg.Network},
|
[]*types.NetworkIdentifier{cfg.Network},
|
||||||
|
nil,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Fatalw("unable to create new server asserter", "error", err)
|
logger.Fatalw("unable to create new server asserter", "error", err)
|
||||||
|
|
Loading…
Reference in a new issue