C#与Google数据存储:RpcException-超出死线

C#与Google数据存储:RpcException-超出死线,c#,google-cloud-platform,google-cloud-datastore,C#,Google Cloud Platform,Google Cloud Datastore,在最后一个小时,我开始从部署在谷歌云中的应用程序中获得异常。这是一个例外: Grpc.Core.RpcException: Status(StatusCode=DeadlineExceeded, Detail="Deadline Exceeded") at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass0_0`2.<<WithRetry>b__0>d.MoveNext() ---

在最后一个小时,我开始从部署在谷歌云中的应用程序中获得异常。这是一个例外:

Grpc.Core.RpcException: Status(StatusCode=DeadlineExceeded, Detail="Deadline Exceeded")
   at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass0_0`2.<<WithRetry>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Google.Cloud.Datastore.V1.DatastoreDbImpl.CommitAsync[T](IEnumerable`1 values, Func`2 conversion, Action`2 keyPropagation, String parameterName, CallSettings callSettings)
   at xxx.<>c__DisplayClass12_0.<<XXXXXAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at XXXXAsync(String pid, String urlHash, String url, Boolean isAccepted) in /xxx/ResultsDB.cs:line 85

在过去的一个小时里,我们得到了20次这个例外。在此之前,它发生在5天前。平均而言,在这起事件发生之前,它在4天内只发生过一次。这里发生了不寻常的事。有人能解释一下吗?

你能为你的问题补充一些细节吗:1)应用程序在谷歌云中的部署位置,例如GKE、GCE、Cloud Run等。2) 您是否配置了不同的超时,或者这些是默认值。3) 您正在使用的库的版本。(我猜你的应用程序和数据存储之间可能存在网络问题,或者数据存储不稳定,但更多信息可能会有所帮助。)回答:1)部署在GKE上的应用程序。2) 默认超时。3) 我正在使用NuGet library“Google.Cloud.Datastore.V1”版本2.1.0(最新版本)4),自从这起事件以来,它就再也没有出现过。查看该版本,我没有看到任何相关事件可以证明这一问题。您能否提供这20个请求在指定的时间范围内占总工作负载的百分比?我没有在此时间范围内完成的请求总数。从那时起,我上周又看到了一次(单一的)错误再次出现。我不认为这可能是你的代码,甚至是你正在使用的库的问题。这可能是你可以通过应用程序的设计来缓解的,就像文档中解释的那样。
MyEntity My = new MyEntity(pid, urlHash);
My.Executed = true;
My.URL = url;
My.IsAccepted = isAccepted;
await DatastoreDbClient.UpdateAsync(My.ToEntity(KeyFactory)).ConfigureAwait(false); // Thrown here.