Google AppEngine 每 10 分钟启动一次应用程序

Google AppEngine launch the application every 10 minutes

我在 App Engine 上部署了一个 nodejs 应用程序,我面临的问题是 App Engine 在 10 分钟后重复点击命令 'node app.js'。我一次只有一个应用程序实例,目前只提供一个版本。

这里是配置应用的package.json和app.yaml

package.json

{
  "name": "appengine-Relay-dashboard",
  "description": "Manages the cronjobs in which the cloud functions are emitted.",
  "version": "0.0.1",
  "private": true,
  "license": "Apache-2.0",
  "author": "Google Inc.",
  "repository": {
    "type": "git",
    "url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
  },
  "engines": {
    "node": "9.x"
  },
  "scripts": {
    "deploy": "gcloud app deploy",
    "start":"node app.js",
    "lint": "repo-tools lint",
    "pretest": "npm run lint",
    "system-test": "repo-tools test app",
    "test": "npm run system-test",
    "e2e-test": "repo-tools test deploy"
  },
  "dependencies": {
    "@google-cloud/bigquery": "^1.2.0",
    "aws-sdk": "^2.230.1",
    "cron": "^1.3.0",
    "express": "^4.16.2",
    "moment-timezone": "^0.5.16",
    "request": "^2.85.0",
    "request-promise": "^4.2.2",
    "sleep": "^5.1.1",
    "twilio": "^3.16.0"
  },
  "devDependencies": {
    "@google-cloud/nodejs-repo-tools": "2.2.1"
  },
  "cloud-repo-tools": {
    "test": {
      "app": {
        "msg": "Hello, world!"
      }
    },
    "requiresKeyFile": true,
    "requiresProjectId": true
  }
}

app.yaml

runtime: nodejs
env: flex

manual_scaling:
    instances: 1
resources:
    cpu: 1
    memory_gb: 0.5
    disk_size_gb: 10

这是我面临的图像中的问题

有人知道如何解决这个问题吗?

实际问题是应用引擎中的 url 返回 502 错误! 所以我向 url 发出了一个 get request(app.get('/')) 并且当它开始工作时,它停止重复自己。我自己得到了解决方案。

主要原因是 url 根本不工作。因此,一旦我将获取请求添加到 url 并再次重新部署应用程序,它就停止访问节点 app.js!