Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 谷歌AppEngine每10分钟发布一次应用程序_Node.js_Google App Engine_Yaml_App Engine Flexible - Fatal编程技术网

Node.js 谷歌AppEngine每10分钟发布一次应用程序

Node.js 谷歌AppEngine每10分钟发布一次应用程序,node.js,google-app-engine,yaml,app-engine-flexible,Node.js,Google App Engine,Yaml,App Engine Flexible,我在appengine上部署了一个nodejs应用程序,我面临的问题是appengine在10分钟后反复点击命令node app.js。我一次只有一个应用实例,目前只提供一个版本 下面是配置app的package.json和app.yaml package.json { "name": "appengine-Relay-dashboard", "description": "Manages the cronjobs in which the cloud functions are emi

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

下面是配置app的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请求(app.get(“/”),当它开始工作时,它停止了自身的重复。我自己找到了解决办法


主要原因是url根本不起作用。因此,当我将get请求添加到url并重新部署应用程序时,它就停止了对node app.js的访问

您正在运行的实例-是否运行超过10分钟?它是否可能死亡或死亡(可能是因为它未通过健康检查)?我得到了解决方案,请参见下面的答案!若你们们能用代码描述你们们想要实现的目标,即使你们们已经为自己找到了解决方案,这对社区中的其他人来说也是有帮助的