TF_Server gRPC failed, call return code:8:Received message larger than max (45129801 vs. 4194304)

时间:2022-11-30 17:35:01

tensorflow_serving 遇到错误:gRPC failed, call return code:8:Received message larger than max (45129801 vs. 4194304)

这里是因为grpc的默认信息长度为int32_max即4*1024*1024,如果修改的话则需:

server端:

main.cc :

builder.SetMaxMessageSize(**)

client端:

grpc::ChannelArguments channel_args;
channel_args.SetInt("grpc.max_receive_message_length",**);
grpc::CreateCustomChannel(tfsAddress, grpc::InsecureChannelCredentials(),channel_args)