mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 03:52:14 +00:00
fix(grpc): increase MaxSendMsgSize (#12066)
# Which Problems Are Solved Users exporting larger orgsanizations were facing grpc message size limits of 4 MiB, while trying to export 6.3 MiB of data. Other export methods like S3 aren't implemented. # How the Problems Are Solved Set MaxSendMsgSize to 10 MiB (allow some overhead). This is not a long-term solution and we should investigate better ways of export. # Additional Changes - none # Additional Context - Support ticket
This commit is contained in:
@@ -132,6 +132,7 @@ func CreateGatewayWithPrefix(
|
||||
client_middleware.UnaryActivityClientInterceptor(),
|
||||
),
|
||||
grpc.WithStatsHandler(client_middleware.DefaultTracingClient()),
|
||||
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxSendMsgSize)),
|
||||
}
|
||||
connection, err := dial(ctx, port, opts)
|
||||
if err != nil {
|
||||
@@ -159,6 +160,7 @@ func CreateGateway(
|
||||
client_middleware.UnaryActivityClientInterceptor(),
|
||||
),
|
||||
grpc.WithStatsHandler(client_middleware.DefaultTracingClient()),
|
||||
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxSendMsgSize)),
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -24,6 +24,10 @@ import (
|
||||
system_pb "github.com/zitadel/zitadel/pkg/grpc/system"
|
||||
)
|
||||
|
||||
const (
|
||||
MaxSendMsgSize = 10 * 1024 * 1024 // 10MiB, global value required for exports.
|
||||
)
|
||||
|
||||
type Server interface {
|
||||
AppName() string
|
||||
MethodPrefix() string
|
||||
@@ -90,6 +94,7 @@ func CreateServer(
|
||||
),
|
||||
),
|
||||
grpc.StatsHandler(middleware.DefaultTracingServer()),
|
||||
grpc.MaxSendMsgSize(MaxSendMsgSize),
|
||||
}
|
||||
if tlsConfig != nil {
|
||||
serverOptions = append(serverOptions, grpc.Creds(credentials.NewTLS(tlsConfig)))
|
||||
|
||||
Reference in New Issue
Block a user