doushi1996 2019-03-26 16:49
浏览 1679

gRPC:grpc:收到的邮件大于最大值(8653851与4194304)(Golang)

The problem:

I am getting this error while receiving message in grpc:

rpc error: code = ResourceExhausted desc = grpc: received message larger than max (8653851 vs. 4194304)

What I tried:

I gave the option to increase the size of the message to be received but it still gave the same error which means this setting of maximum size didn't work:

size := 1024 * 1024 * 12
opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(size)))
conn, err := grpc.Dial(address, opts...)

Comments:

The default limit is 1024 * 1024 * 4 = 4194304 which is shown in the error message. I was expecting this limit to increase to 1024 * 1024 * 12 = 12582912 but clearly it didn't.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#Java#的问题,如何解决?
    • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
    • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化