来自BigQuery Streaming API的频繁503错误 [英] Frequent 503 errors raised from BigQuery Streaming API
问题描述
<$ c $ c> com.google.api.client.googleapis.json.GoogleJsonResponseException:503服务不可用
{
code:503,
errors:[{
domain :global,
message:连接错误,请重试。,
reason:backendError
}],
message: 连接错误,请重试。
}
,位于com.google.api.cli.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
位于com.google.api.client.googleapis.services.json .AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
,位于com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)上
.client.googleapis.services.AbstractGoogleClientRequest $ 1.interceptResponse(AbstractGoogleClientRequest.java:312)
,位于com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1049)
at com。 google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
,位于com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
Rel evant question references:
ul>
我们(BigQuery团队)正在研究增加连接错误的报告。从内部监测来看,过去几天没有出现全球性的连接错误峰值。但是,这并不意味着您的表格没有受到影响。
连接错误可能会非常棘手,因为它们可能是由于错误到达BigQuery服务器之前或离开之后导致的。您可以提供的信息越多,我们就越容易诊断问题。
流式输入的最佳做法是处理像这样的临时错误以重试请求。这可能有点棘手,因为当你遇到连接错误时,你实际上并不知道插入是否成功。如果您的数据包含一个独特的 insertId
(请参阅文档这里),您可以安全地重新发送请求(在重复数据删除窗口期内,我认为这是15分钟),而不必担心同一行会多次添加。
Streaming data into BigQuery keeps failing due to the following error, which occurs more frequently recently:
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)
Relevant question references:
- Getting high rate of 503 errors with BigQuery Streaming API
- BigQuery - BackEnd error when loading from JAVA API
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.
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.
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屋!