Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot Timeout errors when deploying with 2.1.0 to Heroku #1071

Closed
leesharma opened this issue Jul 16, 2015 · 12 comments · Fixed by #1080
Closed

Boot Timeout errors when deploying with 2.1.0 to Heroku #1071

leesharma opened this issue Jul 16, 2015 · 12 comments · Fixed by #1080

Comments

@leesharma
Copy link

I tried to deploy a scaffolded app (with 2.1.0) to Heroku, but I am getting boot timeout errors. The old release (2.0.13) doesn't have this issue, so I'd guess that some configuration change in the new release is causing it.

To reproduce this, I ran the following commands (and selected default options):

mkdir test-app && cd test-app
yo angular-fullstack
bower install && npm install
git init && git add -A && git commit -m 'Initialize repository'
yo angular-fullstack:heroku
cd dist && heroku config:set NODE_ENV=production && heroku addons:create mongolab && heroku ps:scale web=1
grunt --force && grunt buildcontrol:heroku

The Heroku logs are as follows, starting with the mongolab attachment:

heroku[api]: Attach MONGOLAB resource by <email>
heroku[api]: Release v5 created by <email>
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `node server/app.js`
app[web.1]: Recommending WEB_CONCURRENCY=1
app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
app[web.1]: Express server listening on 46443, in production mode
heroku[api]: Scale to web=1 by <email>
heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
heroku[web.1]: Stopping process with SIGKILL
heroku[web.1]: Process exited with status 137
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-hamlet-5547.herokuapp.com request_id=c38e6147-8ec5-4774-8b5a-9e17b69a82ab fwd="69.70.177.123" dyno= connect= service= status=503 bytes=
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=secret-hamlet-5547.herokuapp.com request_id=9fb59a80-b45a-4dbe-9857-0458ba04dc84 fwd="69.70.177.123" dyno= connect= service= status=503 bytes=

Grunt can serve the app locally with no problems.

Let me know if any other information would be useful (or if this is a user error)!

@georgeportillo
Copy link

+1!

@georgeportillo
Copy link

There's definitely something wrong with this version. I did a restore to version 2.0.13 and deployed to Heroku. Everything worked just fine.

If anyone can point me where the problem might be, I'd be pleased to provide a solution. I want to start contributing to this project.

@Awk34
Copy link
Member

Awk34 commented Jul 17, 2015

I'd start by just looking at the commits between those two releases

@RobAikins
Copy link

+1

@kingcody
Copy link
Member

In server/config/environment/index.js change:

ip: process.env.IP || 'localhost',

to:

ip: process.env.IP || '0.0.0.0',

kingcody added a commit to kingcody/generator-angular-fullstack that referenced this issue Jul 18, 2015
@leesharma
Copy link
Author

Awesome, thanks! That fixed the issue for me.

@jonchenn
Copy link

Good job, this fixed my problem too!

@aki-s
Copy link

aki-s commented Jul 21, 2015

This worked well for Heroku, but failed to boot on localhost on the contrary though...
The problem solved!
Thank you.

@kingcody
Copy link
Member

@aki-s what is your setup? Also did you receive any errors?

@aki-s
Copy link

aki-s commented Jul 22, 2015

Oh I'm very sorry for bothering you.
I'm newbie to node.js and generator-anular-fullstack.
It turned out nothing problem was there.

    $grunt serve            # Took c.a. 30sec to boot.
    $grunt serve:debug  # Took c.a. 5 min to boot! 

It took too long time to boot, so I thought something wrong with the setting.

@egkozlov
Copy link

I created my app using angular-fullstack(4.0.4) about 3 weeks ago and wanted to deploy it to heroku. But after deploy I always get "Error R10 (Boot timeout)" error. I spent half of my day and finally figured out that problem was in ../server/config/environment/production.js file.

port: process.env.OPENSHIFT_NODEJS_PORT || process.env.port || 8080,

process.env.port should be in uppercase: process.env.PORT. I found a commit(44dccba) that fixed this problem but unfortunately it was after my app creating :(
So if you have timeout problem with heroku check your production.js file

@Awk34
Copy link
Member

Awk34 commented Sep 14, 2016

@egkozlov that issue has been fixed. Please wait for the next generator release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants