diff --git a/ethdb/kv_interface.go b/ethdb/kv_interface.go index 83c7b4282..07f08df95 100644 --- a/ethdb/kv_interface.go +++ b/ethdb/kv_interface.go @@ -9,7 +9,7 @@ import ( "github.com/ledgerwatch/erigon/metrics" ) -const ReadersLimit = 2000 // MDBX_READERS_LIMIT on 64bit system +const ReadersLimit = 32000 // MDBX_READERS_LIMIT=32767 var ( ErrAttemptToDeleteNonDeprecatedBucket = errors.New("only buckets from dbutils.DeprecatedBuckets can be deleted") diff --git a/go.mod b/go.mod index 5ba4e3553..a3b62ecb8 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - github.com/torquem-ch/mdbx-go v0.15.0 + github.com/torquem-ch/mdbx-go v0.16.0 github.com/ugorji/go/codec v1.1.13 github.com/ugorji/go/codec/codecgen v1.1.13 github.com/urfave/cli v1.22.5 diff --git a/go.sum b/go.sum index a506ad294..3025ff78f 100644 --- a/go.sum +++ b/go.sum @@ -990,6 +990,8 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/torquem-ch/mdbx-go v0.15.0 h1:HUPA06n7tEAyLXv+rFuWvk01FKEm2MavLD9VVEQqMCs= github.com/torquem-ch/mdbx-go v0.15.0/go.mod h1:T2fsoJDVppxfAPTLd1svUgH1kpPmeXdPESmroSHcL1E= +github.com/torquem-ch/mdbx-go v0.16.0 h1:x4dTXDvy1w9MxjlAX6J3/bDqIqu4XQDqTR/u2jMnTiA= +github.com/torquem-ch/mdbx-go v0.16.0/go.mod h1:T2fsoJDVppxfAPTLd1svUgH1kpPmeXdPESmroSHcL1E= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= diff --git a/turbo/cli/flags.go b/turbo/cli/flags.go index 3c330e0a6..6b5fbfb20 100644 --- a/turbo/cli/flags.go +++ b/turbo/cli/flags.go @@ -220,7 +220,7 @@ func ApplyFlagsForNodeConfig(ctx *cli.Context, cfg *node.Config) { func setPrivateApi(ctx *cli.Context, cfg *node.Config) { cfg.PrivateApiAddr = ctx.GlobalString(PrivateApiAddr.Name) cfg.PrivateApiRateLimit = uint32(ctx.GlobalUint64(PrivateApiRateLimit.Name)) - maxRateLimit := uint32(ethdb.ReadersLimit - 16) + maxRateLimit := uint32(ethdb.ReadersLimit - 128) // leave some readers for P2P if cfg.PrivateApiRateLimit > maxRateLimit { log.Warn("private.api.ratelimit is too big", "force", maxRateLimit) cfg.PrivateApiRateLimit = maxRateLimit