【问题标题】:What are the possible causes for app deployed on heroku to get crashed?部署在heroku上的应用程序崩溃的可能原因是什么?
【发布时间】:2016-12-03 01:20:05
【问题描述】:

我有一个 nodejs 应用程序。它构建成功,但随后崩溃。日志显示-

2016-07-28T11:41:39.150069+00:00 app[web.1]: 在 Function.Module._load (module.js:314:12)

2016-07-28T11:41:39.150070+00:00 app[web.1]:启动时 (node.js:148:18)

2016-07-28T11:41:39.225296+00:00 heroku[web.1]:进程以状态 1 退出

2016-07-28T13:24:05.344533+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?hub.mode=subscribe&hub.challenge=432092788&hub .verify_token=fb_bot" host=fb-121071064.herokuapp.com request_id=77443caa-168e-4428-9f43-9611d8230b9e fwd="66.220.146.21" dyno= connect= service= status=503 bytes=

2016-07-28T13:36:37.043656+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fb-121071064。 herokuapp.com request_id=03ed313b-0930-4e12-8303-1af63446a429 fwd="103.204.168.142" dyno= connect= service= status=503 bytes=

2016-07-28T13:36:37.942331+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fb-121071064。 herokuapp.com request_id=ca3b7c09-e44c-4fbb-97e1-156393b9d483 fwd="103.204.168.142" dyno= connect= service= status=503 bytes=

2016-07-28T13:40:46.783907+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fb-121071064.herokuapp.com request_id=928318db-97b2-44c3-ae68-0a5cb20c692f fwd="103.204.168.142" dyno= connect= service= status=503 bytes=

【问题讨论】:

  • 你试过在本地运行吗?
  • 是的,它说,错误 404..未找到!
  • 上面写着 2016-07-28T11:41:39.150069+00:00 app[web.1]: at Function.Module._load (module.js:314:12) ,您是否使用了一些未包含在您的 package.json 中的库?

标签: node.js heroku


【解决方案1】:

你有你的 repo/github 的链接吗?如果它在本地端有 404,那么问题可能不在于 Heroku。当您在本地运行它时,尝试在 Chrome 上打开您的应用程序,然后执行“命令 +shift+ j”以查看是否有任何错误消息。 404 表示无法访问服务器...可能是您的 api 编写方式有问题。

另外,我现在也遇到了类似的问题。这是最接近的指南,似乎有助于解决 heroku 问题: http://www.tilcode.com/deploying-a-mean-stack-app-to-heroku/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-11
    • 1970-01-01
    • 2020-11-08
    • 1970-01-01
    相关资源
    最近更新 更多