googleapiexception:google.apis.requests.requesterror后端错误[500



我是从C#编写的Azure的服务中将数据传输到BigQuery,最近开始获得以下错误的量(大多数请求成功):

消息:[googleapiexception:google.apis.requests.requesterror an 内部错误发生,请求无法完成。[500] 错误[ 消息[发生内部错误,无法完成请求。

这是我在服务中使用的代码:

public async Task<TableDataInsertAllResponse> Update(List<TableDataInsertAllRequest.RowsData> rows, string tableSuffix)
        {
            var request = new TableDataInsertAllRequest {Rows = rows, TemplateSuffix = tableSuffix};
            var insertRequest = mBigqueryService.Tabledata.InsertAll(request, ProjectId, mDatasetId, mTableId);
            return await insertRequest.ExecuteAsync();
        }

就像其他任何其他云服务一样,BigQuery不提供100%的正常运行时间SLA(实际上是99.9%),因此遇到类似此类的瞬态错误并不少见。我们在应用程序中也经常收到它们。

您需要在应用程序中构建指数退回逻辑,以处理此类错误。做到这一点的好方法是使用队列将您的数据流式传输到BigQuery。这就是我们要做的,对我们来说很好。

更多信息:

  1. https://cloud.google.com/bigquery/troubleshooting-errors
  2. https://cloud.google.com/bigquery/loading-data-post-request-request#epp-backoff
  3. https://cloud.google.com/bigquery/streaming-data-into-bigquery
  4. https://cloud.google.com/bigquery/sla

最新更新