diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index c100f12bc..fa7624986 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -24,6 +24,5 @@ program](https://hackerone.com/tendermint). ### BUG FIXES: -- [rpc] [#\4319] Check BlockMeta is not nil in Blocks & BlockByHash - - +- [node] [#\4311] Use `GRPCMaxOpenConnections` when creating the gRPC server, not `MaxOpenConnections` +- [rpc] [#\4319] Check `BlockMeta` is not nil in `/block` & `/block_by_hash` diff --git a/node/node.go b/node/node.go index ffca39ee0..104e572fb 100644 --- a/node/node.go +++ b/node/node.go @@ -948,7 +948,16 @@ func (n *Node) startRPC() ([]net.Listener, error) { grpcListenAddr := n.config.RPC.GRPCListenAddress if grpcListenAddr != "" { config := rpcserver.DefaultConfig() - config.MaxOpenConnections = n.config.RPC.MaxOpenConnections + config.MaxBodyBytes = n.config.RPC.MaxBodyBytes + config.MaxHeaderBytes = n.config.RPC.MaxHeaderBytes + // NOTE: GRPCMaxOpenConnections is used, not MaxOpenConnections + config.MaxOpenConnections = n.config.RPC.GRPCMaxOpenConnections + // If necessary adjust global WriteTimeout to ensure it's greater than + // TimeoutBroadcastTxCommit. + // See https://github.com/tendermint/tendermint/issues/3435 + if config.WriteTimeout <= n.config.RPC.TimeoutBroadcastTxCommit { + config.WriteTimeout = n.config.RPC.TimeoutBroadcastTxCommit + 1*time.Second + } listener, err := rpcserver.Listen(grpcListenAddr, config) if err != nil { return nil, err