question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crashed after deployed on Heroku. But it's working in my local.

See original GitHub issue

I just installed this project on my local and deploy it on heroku. It is working on my local, but crashed on heroku. 2017-08-25T06:30:25.001177+00:00 app[web.1]: > VuePack is running at http://localhost:4000 2017-08-25T06:30:25.001179+00:00 app[web.1]: 2017-08-25T06:31:06.348236+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 2017-08-25T06:31:06.348326+00:00 heroku[web.1]: Stopping process with SIGKILL 2017-08-25T06:31:06.564701+00:00 heroku[web.1]: Process exited with status 137 2017-08-25T06:31:06.578860+00:00 heroku[web.1]: State changed from starting to crashed 2017-08-25T06:35:36.332773+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=webber.herokuapp.com request_id=b2434d56-7222-46e4-822b-11440bbc94a3 fwd="118.163.202.115" dyno= connect= service= status=503 bytes= protocol=https 2017-08-25T06:35:37.269529+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=webber.herokuapp.com request_id=de3f5728-b7d5-4c61-a3e0-4bd2e9911bf1 fwd="118.163.202.115" dyno= connect= service= status=503 bytes= protocol=https

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:17

github_iconTop GitHub Comments

51reactions
webberwangcommented, Aug 25, 2017

https://stackoverflow.com/questions/15693192/heroku-node-js-error-web-process-failed-to-bind-to-port-within-60-seconds-of

within server.js change the last line to

server.listen(process.env.PORT || port)

20reactions
celikmustafa89commented, Jul 14, 2018

THIS SOLUTION IS FOR GO When you deploy an app through heroku, it does not allow you to specify the port number.
In other words, you can not specify your web service’s port number as 8000 or something else, heroku decides the port number in runtime.
so, you can not use the following code:

    log.Fatal(http.ListenAndServe(":8000", router))

What you can do is, getting the runtime port of heroku.
In short, just use the following code:

    log.Fatal(http.ListenAndServe(":" + os.Getenv("PORT"), router))
Read more comments on GitHub >

github_iconTop Results From Across the Web

Causes of Heroku H10-App Crashed ... - DEV Community ‍ ‍
This article is focused on the Heroku H10-App crashed error code which is thrown when an application crashes on Heroku.
Read more >
node.js app works locally but crashes when deployed on heroku
Go to Dashboard -> <your app> -> settings -> Config Vars · Click Reveal Config Vars · Fill in your environment variables (DB_URL,...
Read more >
Troubleshooting Node.js Deploys - Heroku Dev Center
Your Node.js deploy failed - now what? Start with these simple steps to troubleshoot a build issue. Check the buildpack. Is the app...
Read more >
App works locally but crashes on Heroku [Solved] - JavaScript
Try removing any code where you require dotenv to see if that will work. Double check your Heroku logs too and you should...
Read more >
HELP - Heroku crash when using AWS - Reddit
View your logs ( https://devcenter.heroku.com/articles/logging ), restart the app, find the actual crash when it happens.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found