我是 Dgraph 的新手,我正在使用 .NET Core C# 客户端(https://github.com/MichaelJCompton/Dgraph-dotnet 1)连接 Dgraph 服务器、查询和变异数据。
我面临这个问题:
{
ExceptionalError with Message='Status(StatusCode=ResourceExhausted,
Detail="received trailing metadata size exceeds limit")',
Exception='Grpc.Core.RpcException: Status(StatusCode=ResourceExhausted, Detail="received trailing metadata size exceeds limit") at
DgraphDotNet.GRPCConnection.Query(Request req) at
DgraphDotNet.DgraphClient.Query(Request req) at
DgraphDotNet.Transactions.Transaction.QueryWithVars(String queryString, Dictionary`2 varMap)'
}
GRPC 选项
var server = "xxxxx";
CurrentClient.Connect(server, ChannelCredentials.Insecure, new[]{
new ChannelOption(ChannelOptions.MaxSendMessageLength ,2147483647),
new ChannelOption(ChannelOptions.MaxReceiveMessageLength , 2147483647)
});
程序.cs
services.AddGrpc().AddServiceOptions<DgraphDotNet.IDgraphClient>(options => {
options.EnableDetailedErrors = true;
options.ReceiveMaxMessageSize = 2147483647;
options.SendMaxMessageSize = 2147483647;
});
但仍然面临这个问题。附加:我调试到最终的 GRPC 调用
CallInvoker.AsyncUnaryCall(__Method_Query, null, options, request);
并看到这样的参数
https://i.stack.imgur.com/czAgN.png https://i.stack.imgur.com/oyQd7.png