Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Heroku deploy timeout #108

Open
msaglietto opened this Issue · 9 comments

4 participants

@msaglietto

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
Owner
@msaglietto

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
Owner
@msaglietto

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

@gavinjpotts

@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

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

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

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

.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
Something went wrong with that request. Please try again.