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

Heroku deploy timeout #108

Open
msaglietto opened this issue Aug 2, 2013 · 9 comments
Open

Heroku deploy timeout #108

msaglietto opened this issue Aug 2, 2013 · 9 comments

Comments

@msaglietto
Copy link

Hello,

I am starting an application on a heroku instance, and im having problems because the bootstrap process timeout by heroku because after a commit its taking more than 60 seconds to bind the port.

Here is the log:

2013-08-02T15:10:55.268775+00:00 app[web.1]: Running "mincss:app" (mincss) task
2013-08-02T15:10:55.717931+00:00 app[web.1]: File build/app/styles/app.min.css created.
2013-08-02T15:11:07.476917+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-08-02T15:11:07.477188+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-02T15:11:08.933154+00:00 heroku[web.1]: Process exited with status 137
2013-08-02T15:11:08.961825+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-02T15:11:38.319747+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rs002dev.herokuapp.com fwd="186.59.88.106" dyno= connect= service= status=503 bytes=

If change the procfile to be without the optimize, like
web: ./node_modules/.bin/grunt build && node server/server
It works fine

Any clues how to make this process faster or the timeout longer?

@ericclemmons
Copy link
Owner

Can you let me know what's in your bower.json & your index.html (particularly the scripts & css) section?

I mean, not the source, but I just want to see the references to try & reproduce.

Truth be told, the optimization pass can take a while depending on the amount of images & files being parsed...

On Friday, August 2, 2013 at 1:58 PM, Mauricio Saglietto wrote:

Hello,
I am starting an application on a heroku instance, and im having problems because the bootstrap process timeout by heroku because after a commit its taking more than 60 seconds to bind the port.
Here is the log:

2013-08-02T15:10:55.268775+00:00 app[web.1 (http://web.1)]: Running "mincss:app" (mincss) task
2013-08-02T15:10:55.717931+00:00 app[web.1 (http://web.1)]: File build/app/styles/app.min.css created.
2013-08-02T15:11:07.476917+00:00 heroku[web.1 (http://web.1)]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-08-02T15:11:07.477188+00:00 heroku[web.1 (http://web.1)]: Stopping process with SIGKILL
2013-08-02T15:11:08.933154+00:00 heroku[web.1 (http://web.1)]: Process exited with status 137
2013-08-02T15:11:08.961825+00:00 heroku[web.1 (http://web.1)]: State changed from starting to crashed
2013-08-02T15:11:38.319747+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=rs002dev.herokuapp.com (http://rs002dev.herokuapp.com) fwd="186.59.88.106" dyno= connect= service= status=503 bytes=
If change the procfile to be without the optimize, like
web: ./node_modules/.bin/grunt build && node server/server
It works fine
Any clues how to make this process faster or the timeout longer?


Reply to this email directly or view it on GitHub (#108).

@msaglietto
Copy link
Author

to bower.json I only added "angular-resource": "~1.0.7".

And to the index.html I added the navbar on the html and as scripts the angular-resource.js, two angular controllers and a service.

That helps?

@ericclemmons
Copy link
Owner

It helps :) Basically, you're not doing anything crazy.

Allllright, let's see what I can figure out :)

@msaglietto
Copy link
Author

Could it be mongoose that take to much time to be installed from npm?

@gavinjpotts
Copy link

@ericclemmons did you ever work out a way around this when it's a problem? We are having the same issue with production-level builds (when it minifies, etc). Is there anyway to lower the build time by doing something before-hand locally?

@facultymatt
Copy link

We're going to need to

  • run foreman start which will simulate the build heroku does.
  • commit the build folder to master 'gasp'
  • change the procfile to just start the app.

@ericclemmons
Copy link
Owner

Turns out that just having .npmignore (with the build folder removed) seems to work well! Also, I'm moving this to the https://github.com/genesis/ org with several updates!

@facultymatt
Copy link

Why is that, aren't you already ignoring node_modules in gitignore? How does .npmignore make the minify process any quicker - this is whats causing the timeout for us - since there's a lot of JS the minify process takes wayyyyy too long. More than the 60 seconds allowed by heroku.

A colleague suggested getting around the by running heroku run bash which gives you command line access to then run build etc. However this means the app won't properly restart on its own which is a big fail.

Also, I've been coming across more and more opinions that bower components and node modules SHOULD be committed for production apps... to avoid failure in cases where the dependencies are not available or removed. THoughts?

@ericclemmons
Copy link
Owner

.npmignore is treated differently from .gitignore when present and running the command npm pack, which is how Nodejitsu does deployments. Versioning the build folder is totally fine, IMO.

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

No branches or pull requests

4 participants