28

I've been searching around on this one for a while and can't find anything that seems to be applicable in my situation. I've been staring at these logs and I can't see what the problem is.

This has happened during deployments before, but always seemed to resolve itself. Now this just happened on its own (no deployment) and I can't get out of it. Tried reverting back to a previous version of the app, but it appears I'm stuck. I've reset the dyno and have also done a rake db:migrate.

There are some repetitive things in the log, but I just don't know what to read out of them. Anybody have any idea where the problem is? Any guidance would be greatly appreciated. See the logs below.

Jun 18 15:51:54 snapclass-production app/heroku-postgres:  source=HEROKU_POSTGRESQL_WHITE measure.current_transaction=1077 measure.db_size=6153016bytes measure.tables=0 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.99981 measure.table-cache-hit-rate=0.99349
Jun 18 15:52:06 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="46.165.195.139" dyno= connect= service= status=503 bytes= 
Jun 18 15:52:07 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="178.255.152.2" dyno= connect= service= status=503 bytes= 
Jun 18 15:52:12 snapclass-production app/postgres:  [47-1]  [] LOG:  checkpoint starting: time 
Jun 18 15:52:13 snapclass-production app/postgres:  [48-1]  [] LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=0.000 s, sync=0.000 s, total=0.334 s; sync files=0, longest=0.000 s, average=0.000 s 
Jun 18 15:52:51 snapclass-production app/heroku-postgres:  source=HEROKU_POSTGRESQL_WHITE measure.current_transaction=1077 measure.db_size=6153016bytes measure.tables=0 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.99994 measure.table-cache-hit-rate=0.99997 
Jun 18 15:53:06 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="95.141.32.46" dyno= connect= service= status=503 bytes= 
Jun 18 15:53:48 snapclass-production app/heroku-postgres:  source=HEROKU_POSTGRESQL_WHITE measure.current_transaction=1077 measure.db_size=6153016bytes measure.tables=0 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.97826 measure.table-cache-hit-rate=0.99999 
Jun 18 15:54:06 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="95.211.217.68" dyno= connect= service= status=503 bytes= 
Jun 18 15:54:17 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="205.197.158.210" dyno= connect= service= status=503 bytes= 
Jun 18 15:54:17 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=www.snapclass.com fwd="205.197.158.210" dyno= connect= service= status=503 bytes= 
Jun 18 15:54:25 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=demosidney.snapclass.com fwd="202.46.61.33" dyno= connect= service= status=503 bytes=  
Jun 18 15:54:44 snapclass-production heroku/web.1:  State changed from crashed to starting 
Jun 18 15:54:44 snapclass-production app/heroku-postgres:  source=HEROKU_POSTGRESQL_WHITE measure.current_transaction=1077 measure.db_size=6153016bytes measure.tables=0 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.98897 measure.table-cache-hit-rate=0.99087 
Jun 18 15:54:48 snapclass-production heroku/web.1:  Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 50180` 
Jun 18 15:55:40 snapclass-production app/heroku-postgres:  source=HEROKU_POSTGRESQL_WHITE measure.current_transaction=1077 measure.db_size=6153016bytes measure.tables=0 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.99926 measure.table-cache-hit-rate=0.99996 
Jun 18 15:55:50 snapclass-production heroku/web.1:  Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 
Jun 18 15:55:50 snapclass-production heroku/web.1:  Stopping process with SIGKILL 
Jun 18 15:55:51 snapclass-production heroku/web.1:  Process exited with status 137 
Jun 18 15:55:51 snapclass-production heroku/web.1:  State changed from starting to crashed 
Jun 18 15:55:52 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=demosidney.snapclass.com fwd="119.63.193.130" dyno= connect= service= status=503 bytes= 
Jun 18 15:55:52 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/snapclasses/sat-prep-math/register host=www.snapclass.com fwd="173.199.115.115" dyno= connect= service= status=503 bytes= 
Jun 18 15:55:53 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="23.21.36.78" dyno= connect= service= status=503 bytes= 
Jun 18 15:55:54 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="23.22.98.102" dyno= connect= service= status=503 bytes= 
Jun 18 15:55:54 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="91.109.115.41" dyno= connect= service= status=503 bytes= 
Jun 18 15:56:06 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="174.34.224.167" dyno= connect= service= status=503 bytes= 
mgreich
  • 381
  • 1
  • 3
  • 3
  • Have you tried contacting heroku's support? – mor Jun 18 '13 at 23:29
  • 1
    There doesn't appear to be a good way to reach their support team anymore. I only see a page for a [Critical Support service](https://www.heroku.com/critical). Most everything directs back to their [Help](https://help.heroku.com/) docs. You used to be able to submit a ticket, but not it looks like the Critical Support is some added service. So I have gone through their docs for some help and come up empty, but haven't contacted their critical support. – mgreich Jun 19 '13 at 19:43
  • Check if this solution will work for you [package.json misconfig](https://stackoverflow.com/questions/17180495/heroku-code-h10-desc-app-crashed-cant-figure-out-why-its-crashing/58679162#58679162) – Dev Yego Nov 03 '19 at 10:17

8 Answers8

31

Try following steps:

- git push heroku master # if not done
- heroku run rake db:migrate
- heroku restart

Wait couple of minutes...

Moin Haidar
  • 1,654
  • 1
  • 16
  • 16
19

In my case it was because I was hardcoding the port to be used,

I changed using this, and it worked

app.listen(process.env.PORT || 3000);
Ilan
  • 479
  • 7
  • 17
7

To create a heroku account

 $heroku create

To verify your git configration is well

$git remote -v

Associate a Git repo with an existing application

$heroku git:remote -a herokuapp-name

To perform push to master

$git push heroku master

To get your database to work you will have to migrate to production database

$heroku run bundle exec rake db:migrate

Then restart

heroku restart

finaly browse to your location

Ahmed Ali
  • 671
  • 7
  • 10
1

I have also faced this error, overall this error means that It can't work with your dependencies and one of the reason may be old versions of dependencies. I solved this by following two steps: 1) I updated all my dependencies manually. 2) I changed my Flask API from app.py to err.py (could be helpful to have different name, but not necessary.

This worked for me. Hope, it helps!!

techPirate99
  • 146
  • 1
  • 9
0

I had the main entry in package.json pointing at the wrong directory. Ensure it is pointed to the build output directory. As for my case, I had the server file in the /bin folder so I set my package.json

{
  "main": "build/bin/www.js"
  "scripts": {
    "start": "node ."
  }
}
Dev Yego
  • 539
  • 2
  • 12
0

In my case, I was working with express on ES6 using babel, the babel was imported as devDependency (Heroku ignores devDependencies in production) after including them into dependencies it worked for me.

"dependencies": {
    "@babel/register": "^7.8.3",
    "@babel/core": "^7.8.4",
    "@babel/preset-env": "^7.8.4"
}
AzizStark
  • 1,390
  • 1
  • 17
  • 27
0

changing how I connect to my database on code helped

    let  databaseURL = pgURL
   if var postgresConfig = PostgresConfiguration(url: databaseURL) {
    postgresConfig.tlsConfiguration = tls
    app.databases.use(.postgres(
        configuration: postgresConfig
    ), as: .psql)
    app.middleware.use(ErrorMiddleware.default(environment: app.environment))

    app.migrations.add(CreateTranscription())
    app.migrations.add(CreateTemplate())

    app.routes.defaultMaxBodySize = "10mb"

    try app.autoMigrate().wait()

    // register routes
    try routes(app)
} else{
    fatalError("DATABASE_URL not configured")
}
masaldana2
  • 635
  • 9
  • 20
0

Setup Proc file in your App

web: node build/build.js

Heroku Proc file

gautam90
  • 58
  • 7