google-cloud-functions - 带有 Google Cloud Functions 上游请求超时的 ESPv2

标签 google-cloud-functions google-cloud-endpoints google-cloud-endpoints-v2

我在通过 ESPv2 从 Google Coud 函数获取答案时遇到问题。
每次我请求它时,我都会在 15 秒后收到状态代码为 504 的响应。
我的函数需要 30 到 45 秒。
在日志中,功能正确并在 35 秒后回复。

有没有办法增加 ESPv2 中的超时时间?

谢谢

最佳答案

对于遇到此问题的任何其他人,在 x-google-backend 下的 openapi-functions.yaml 中,您应该设置属性截止日期并将其设置为您想要的任何值(以秒为单位)。

这是隐藏的文档 https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#deadline

问题相关:https://github.com/GoogleCloudPlatform/esp-v2/issues/4

关于google-cloud-functions - 带有 Google Cloud Functions 上游请求超时的 ESPv2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60738838/

相关文章:

android - 使用实体类设计模式在 Android Studio 中生成 Cloud Endpoint 客户端库

google-app-engine - 带有gradle-appengine-plugin的Google Cloud Endpoints 2.0

java - 使用端点框架工具生成 OpenAPI 文档时出错

javascript - 如何运行后台 Cloud Function 并安排数据库更改?

node.js - 如何在 Firebase 可调用云函数上抛出错误?

javascript - 如何在nuxt.js ssr中将数据从node.js传递到vue?

javascript - 如何使用现有数据以及随机生成的 ID 更新我的 firebase 实时数据库中的数据

google-cloud-endpoints - Google Cloud Endpoints 中 @Named 的用途

python - Google Cloud Endpoints V2 多类 API 错误 App Engine 标准

google-cloud-platform - 通过 ESPv2 : Problem with timeout 的谷歌云功能 + 端点