[英]Cloud Run Error 504 (Upstream Request Timeout) after successful deploy
I was following this tutorial from Google to deploy a servise to Cloud Run ( https://codelabs.developers.google.com/codelabs/cloud-run-hello-python3#5 ).我正在按照 Google 的本教程将服务部署到 Cloud Run ( https://codelabs.developers.google.com/codelabs/cloud-run-hello-python3#5 )。 In Cloud Shell my project is deployed successfully (screenshot below).在 Cloud Shell 中,我的项目已成功部署(截图如下)。 However, once I click on the link I get timeout.但是,一旦我单击链接,我就会超时。 If I test it locally from Cloud Shell it works fine.如果我从 Cloud Shell 在本地测试它,它工作正常。
Why could this be happening?为什么会发生这种情况? Where could I get more data about the issue?我在哪里可以获得有关该问题的更多数据?
As mentioned in the Documentation :如 文档中所述:
For Cloud Run services, the request timeout setting specifies the time within which a response must be returned by services deployed to Cloud Run.对于 Cloud Run 服务,请求超时设置指定部署到 Cloud Run 的服务必须返回响应的时间。 If a response isn't returned within the time specified, the request ends and error 504 is returned.如果在指定时间内没有返回响应,则请求结束并返回错误 504。
The timeout is set by default to 5 minutes and can be extended up to 60 minutes.超时默认设置为 5 分钟,最长可延长至 60 分钟。 You can change this setting when you deploy a container image or by updating the service configuration.您可以在部署容器映像或更新服务配置时更改此设置。 In addition to changing the Cloud Run request timeout, you should also check your language framework to see whether it has its own request timeout setting that you must also update.除了更改 Cloud Run 请求超时之外,您还应该检查您的语言框架,看看它是否有自己的请求超时设置,您还必须更新该设置。
You can refer to this Public group issue which will be helpful in resolving the current error.您可以参考此公共组问题,这将有助于解决当前错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.