Heroku“进程退出状态137” node.js app [英] Heroku "Process exited with status 137" node.js app

查看:218
本文介绍了Heroku“进程退出状态137” node.js app的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发布了一个类似主题的问题。我对URL上的所有内容进行了重大改动,并且上次发生了同样的事情:我可以使用 heroku local web 部署所有内容并运行它。当我去网络dyno,它说我有一个应用程序错误,然后我检查日志。这就是它所说的(我在github上使用一个名为atwork的项目):

I recently posted a question on a similar topic. I did a major overhaul of everything on the URL, and the same thing happened as last time: I could deploy everything and run it using heroku local web. When I went to the web dyno, it said I had an application error and I then check the logs. Here is what it said (I am using a project on github called atwork):

2017-05-02T02:35:39.191493+00:00 app[web.1]: Loaded model: chats.js
2017-05-02T02:35:39.200517+00:00 app[web.1]: Loaded model: streams.js
2017-05-02T02:35:39.196830+00:00 app[web.1]: Loaded model: posts.js
2017-05-02T02:35:39.209761+00:00 app[web.1]: Loaded model: users.js
2017-05-02T02:35:40.067321+00:00 app[web.1]: AtWork running at http://:::8111
2017-05-02T02:35:50.116492+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=room111-thoughts.herokuapp.com request_id=44a6e779-e6b8-4a33-a5b9-53430af2ad8f fwd="108.221.62.78" dyno= connect= service= status=503 bytes= protocol=https
2017-05-02T02:36:35.859814+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-05-02T02:36:35.859903+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-05-02T02:36:35.956564+00:00 heroku[web.1]: Process exited with status 137
2017-05-02T02:36:35.969766+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-02T02:37:22.933285+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=room111-thoughts.herokuapp.com request_id=80ffc71f-d792-4538-b50a-5140b7658819 fwd="108.221.62.78" dyno= connect= service= status=503 bytes= protocol=https

我是Heroku和Node.js的初学者,所以任何帮助都表示赞赏。我将提供找到答案所需的任何信息。

I am a beginner to Heroku and Node.js, so any help is appreciated. I will provide any information needed to find an answer.

推荐答案

我检查了日志,它说 at = error code = H10 desc =App crashed,这意味着你有未捕获的异常,所以你应该检查你的代码。

I checked the logs, it said that at=error code=H10 desc="App crashed", it means you have uncaught Exception, so you should check your code.

如果你想在Heroku上使用 mongodb ,你应该尝试添加 mongodb你的应用程序的插件。你可以找到这里的文件

if you want to use mongodb on Heroku, you should try to add the mongodb addon for your application. you can find the doc here

并尝试使用 process.env.PORT ,而不是您要使用的端口。

and try to use process.env.PORT, not the port you want to use.

如果它没有'仍然可以解决您的问题,您可以尝试使用此命令 heroku run bash ,此命令可以让您进入heroku环境并启动您的服务器。

if it doesn't still solve your problem, you can try to use this command heroku run bash, this command can make you into heroku environment and start your server.

这篇关于Heroku“进程退出状态137” node.js app的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆