无法在 Firebase 托管后面调用 Google Cloud Function - 状态 503,但状态页面上没有指示

人气:880 发布:2022-10-16 标签: firebase google-cloud-functions firebase-hosting fastly

问题描述

我在访问 公开的 Google Cloud HTTP 函数时遇到问题 通过 Firebase 托管.我认为 CDN 存在问题,因为功能没有改变,但我在状态页面上看不到任何内容:

I have a problem accessing a Google Cloud HTTP Function that is exposed through Firebase Hosting. I assume there is an issue with the CDN, because the function has not changed, but I do not see anything on the status pages:

https://status.firebase.google.com/ - 托管 是绿色的https://status.cloud.google.com/ - 谷歌云函数是绿色的 https://status.firebase.google.com/ - Hosting is green https://status.cloud.google.com/ - Google Cloud Fuctions is green

直接访问函数,即不是通过 Firebase 托管,而是使用 https://{region}{app}.cloudfunctions.net/{name} URL 似乎遇到了同样的问题.

Accessing the function directly, i.e. not through Firebase Hosting but using the https://{region}{app}.cloudfunctions.net/{name} URL seems to be running into the same issues.

最初,我在将近两分钟后收到此回复

Initially, I received this response after close to two minutes

content-type: text/plain;charset=US-ASCII
date: Tue, 06 Oct 2020 14:10:01 GMT
fastly-host: cache-hhn4049-HHN
server: Varnish
status: 503

Timed out while waiting on cache-hhn4049-HHN

这似乎表明 Fastly 存在问题(列为 Firebase 的子处理器),但他们的 状态页面 显示一切正常.

This seems to indicate a problem with Fastly (listed as a subprocessor for Firebase), but their status page shows everything as operational.

一段时间后,我似乎在 15-30 秒超时后收到了另一方的回复:

After some time, I seem to be getting responses from a different party after a timeout of 15-30s:

(为了便于阅读,去掉了 HTML)

(stripped HTML for readability)

accept-ranges: bytes
content-length: 323
content-type: text/html; charset=UTF-8
date: Tue, 06 Oct 2020 14:17:22 GMT
fastly-restarts: 1
server: Google Frontend
status: 500
vary: x-fh-requested-host, accept-encoding
x-cache: MISS
x-cache-hits: 0
x-cloud-trace-context: 234db5d36bf48ff0a385ed838e14676c
x-served-by: cache-hhn4049-HHN
x-timer: S1601993817.546227,VS0,VE25795

Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.

当然,等待 30 秒也无济于事.

Of course, waiting for 30 seconds does not help.

在云功能日志中,我确实看到一些请求通过并在 400-500 毫秒之间进行正常执行.我可以看到一次崩溃"在 54 毫秒内完成,两次更长的执行时间在 20 秒左右,一次超时(60 秒).该函数用作自定义身份验证过程的一部分,因此通常会有很多请求.

In the cloud functions log I do see some requests going through and taking between 400-500ms for normal execution. I can see one 'crash' finishing in 54ms, two longer executions at around 20s, and one timeout (60s). The function is used as a part of a custom authentication process, so there are usually a lot of requests.

关于我可以做些什么来了解问题所在有什么建议吗?或者是一个状态页面,它实际上可以告诉我在哪里可以查找问题?

Any advice on what I can do to understand what is the issue? Or a status page that can actually tell me where I can look for a problem?

推荐答案

firebaser here

在过去一个小时左右部署 Cloud Functions 确实存在问题.我们正在努力将问题添加到 Firebase 状态页面.

There were indeed issues with deploying Cloud Functions in the past hour or so. We're working on adding the issue to the Firebase status page.

现在应该基本恢复正常了.有关当前状态,请参阅 Google Cloud 信息中心顶部的黄色横幅.如果没有黄色横幅,则问题可能已完全解决.

It should now mostly be back to normal. For the current status, see the yellow banner at the top of the Google Cloud dashboard. If there is no yellow banner, the problem is likely completely fixed.

717