Skip to content

Commit

Permalink
Merge #4609
Browse files Browse the repository at this point in the history
4609: [Access] Update default grpc max message size to 1GiB r=peterargue a=peterargue

Closes: #4596

The amount of data returned from some Access API requests has increased over time, resulting in response size errors on Access and Execution nodes. While the max message size is configurable via CLI flags, this PR updates the default to be well above the current largest messages.

Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
  • Loading branch information
bors[bot] and peterargue authored Aug 9, 2023
2 parents f074502 + 67e6d12 commit 79559fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utils/grpcutils/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (
"github.com/onflow/flow-go/network/p2p/keyutils"
)

// DefaultMaxMsgSize use 20MB as the default message size limit.
// grpc library default is 4MB
const DefaultMaxMsgSize = 1024 * 1024 * 20
// DefaultMaxMsgSize use 1 GiB as the default message size limit.
// This enforces a sane max message size, while still allowing for reasonably large messages.
// grpc library default is 4 MiB.
const DefaultMaxMsgSize = 1 << (10 * 3) // 1 GiB

// CertificateConfig is used to configure an Certificate
type CertificateConfig struct {
Expand Down

0 comments on commit 79559fc

Please sign in to comment.