【问题标题】:what does error status 413 in node.js, heroku mean?node.js,heroku中的错误状态413是什么意思?
【发布时间】:2015-04-15 12:32:10
【问题描述】:

我有一个 node.js 应用程序在本地运行良好,但是当我在 heroku 运行时它退出了,我的状态为 0 或状态 143 有人明白这意味着什么吗?

2015-04-14T21:14:41.428508+00:00 heroku[api]: Release v8 created by
josef@actionist.se
2015-04-14T21:14:41.569626+00:00 heroku[web.1]: State changed from up to starting
2015-04-14T21:14:44.101446+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-04-14T21:14:45.789499+00:00 heroku[web.1]: Starting process with command `node index.js`
2015-04-14T21:14:45.675609+00:00 heroku[web.1]: Process exited with status 143
2015-04-14T21:14:47.559184+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-14T21:14:47.559208+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-14T21:14:49.398042+00:00 app[web.1]: Node app is running at localhost:26268
2015-04-14T21:14:49.825551+00:00 heroku[web.1]: State changed from starting to up
2015-04-14T21:16:05.765151+00:00 heroku[api]: Deploy bcb1918 by josef@actionist.se
2015-04-14T21:16:05.765151+00:00 heroku[api]: Release v9 created by josef@actionist.se
2015-04-14T21:16:06.234464+00:00 heroku[web.1]: State changed from up to starting
2015-04-14T21:16:09.804498+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-04-14T21:16:10.788591+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-14T21:16:11.515039+00:00 heroku[web.1]: Process exited with status 143
2015-04-14T21:16:12.732654+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-14T21:16:12.732736+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-14T21:16:13.951425+00:00 app[web.1]: 
2015-04-14T21:16:13.951416+00:00 app[web.1]: 
2015-04-14T21:16:13.951422+00:00 app[web.1]: > party@0.1.3 start /app
2015-04-14T21:16:13.951424+00:00 app[web.1]: > node app.js
2015-04-14T21:16:15.479452+00:00 heroku[web.1]: Process exited with status 0
2015-04-14T21:16:15.494024+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-14T21:17:13.883207+00:00 heroku[router]: at=error code=H10     desc="App crashed" method=GET path="/host=actionistcookalong.herokuapp.com request_id=a5f2ce21-21bd-43ac-8434-9eb39282c542 fwd="178.78.232.172" dyno= connect= service= status=503 bytes=
2015-04-14T21:21:01.044982+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-14T21:21:05.040510+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-14T21:21:06.954809+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-14T21:21:06.954834+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-14T21:21:07.605924+00:00 app[web.1]: 
2015-04-14T21:21:07.605931+00:00 app[web.1]: > party@0.1.3 start /app
2015-04-14T21:21:07.605933+00:00 app[web.1]: > node app.js
2015-04-14T21:21:07.605935+00:00 app[web.1]: 
2015-04-14T21:21:08.874268+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-14T21:21:08.868440+00:00 heroku[web.1]: Process exited with status 0

【问题讨论】:

  • 不确定这是否会有所帮助,但据我所知,状态 143 是退出代码。也许看看下面的stackoverflow.com/questions/17631536/…
  • 实际上 Heroku 停止了两行的所有内容,这就是为什么您会看到 143 返回的原因是它们发送了一个 SIGTERM。所以暂时忽略它。请注意,事情又开始了。往下走。它正在向路由器扔 H10。

标签: javascript node.js heroku


【解决方案1】:

退出代码 143 表示已发送终止进程并且 SIGTERM 信号终止了您的进程。这通常在您执行任何重新启动命令时触发。

【讨论】:

    【解决方案2】:

    尝试运行控制台,它也可能会崩溃......但会给你推理。通常是一些你没有注意到或忘记 Heroku 错误日志不善于报告的小变化。

    运行这个

    heroku run node
    

    heroku restart
    

    【讨论】:

      猜你喜欢
      • 2015-08-25
      • 2023-02-22
      • 1970-01-01
      • 1970-01-01
      • 2011-06-18
      • 2017-06-21
      • 1970-01-01
      • 2015-02-01
      相关资源
      最近更新 更多