BigQuery Streaming API 引发的常见 503 错误 [英] Frequent 503 errors raised from BigQuery Streaming API

查看:16
本文介绍了BigQuery Streaming API 引发的常见 503 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将数据流式传输到 BigQuery 一直失败,原因是以下错误,最近更频繁地发生:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 503 Service Unavailable
{
  "code" : 503,
  "errors" : [ {
    "domain" : "global",
    "message" : "Connection error. Please try again.",
    "reason" : "backendError"
  } ],
  "message" : "Connection error. Please try again."
}
        at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:312)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1049)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)

相关问题参考:

推荐答案

我们(BigQuery 团队)正在调查您关于连接错误增加的报告.从内部监控来看,过去几天没有出现全球连接错误激增的情况.但是,这并不意味着您的表不受影响.

We (the BigQuery team) are looking into your report of increased connection errors. From the internal monitoring, there hasn't been global a spike in connection errors in the last several days. However, that doesn't mean that your tables, specifically, weren't affected.

连接错误可能很难追查,因为它们可能是在到达 BigQuery 服务器之前或离开之后由错误引起的.您提供的信息越多,我们就越容易诊断问题.

Connection errors can be tricky to chase down, because they can be caused by errors before they get to the BigQuery servers or after they leave. The more information your can provide, the easier it is for us to diagnose the issue.

流式输入的最佳做法是处理像这样的临时错误以重试请求.这可能有点棘手,因为当您收到连接错误时,您实际上并不知道插入是否成功.如果您在数据中包含唯一的 insertId(请参阅文档 此处),您可以安全地重新发送请求(在重复数据删除窗口期间,我认为是 15 分钟),而不必担心同一行会被多次添加.

The best practice for streaming input is to handle temporary errors like this to retry the request. It can be a little tricky, since when you get a connection error you don't actually know whether the insert succeeded. If you include a unique insertId with your data (see the documentation here), you can safely resend the request (within the deduplication window period, which I think is 15 minutes) without worrying that the same row will get added multiple times.

这篇关于BigQuery Streaming API 引发的常见 503 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆