gpt4 book ai didi

javascript - Heroku "Process exited with status 137"node.js 应用程序

转载 作者:IT老高 更新时间:2023-10-28 13:26:26 25 4
gpt4 key购买 nike

我最近发布了一个关于类似主题的问题。我对 URL 上的所有内容进行了大修,并且发生了与上次相同的事情:我可以部署所有内容并使用 heroku local web 运行它。当我去网络测功机时,它说我有一个应用程序错误,然后我检查了日志。这是它所说的(我在github上使用了一个名为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 的初学者,因此非常感谢任何帮助。我将提供找到答案所需的任何信息。

最佳答案

我检查了日志,它说 at=error code=H10 desc="App crashed",这意味着你有 uncaught Exception,所以你应该检查你的代码。

如果你想在 Heroku 上使用 mongodb,你应该尝试为你的应用添加 mongodb 插件。您可以找到文档 here

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

如果还是不能解决你的问题,你可以试试这个命令heroku run bash,这个命令可以让你进入heroku环境并启动你的服务器。

关于javascript - Heroku "Process exited with status 137"node.js 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43728830/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com