【问题标题】:Google App Engine stopping when no HTTP request没有 HTTP 请求时 Google App Engine 停止
【发布时间】:2018-09-10 17:28:58
【问题描述】:

我的 Google 应用在没有发送 HTTP 请求时停止。 我的应用引擎正在侦听来自外部 API (DiscordJS) 的请求

这是我的 app.yaml

runtime: nodejs8
env: standard
instance_class: B1
handlers:
  - url: '.*'
    script: index.js
basic_scaling:
 idle_timeout: 900s
 max_instances: 1

【问题讨论】:

  • 你有什么问题?
  • 这可以通过使用 Stack 驱动器每 60 秒发送一次请求来解决。这将保持即时运行 24/7

标签: node.js google-app-engine google-cloud-platform


【解决方案1】:

如果没有请求进入,基本扩展实际上会拒绝实例;你的设置为 900s 空闲超时。如果您想要一个始终处于启动状态并正在侦听的实例,则需要手动扩展。详情请查看scaling documentation

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-04-18
    • 1970-01-01
    • 2022-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-04
    • 1970-01-01
    相关资源
    最近更新 更多