Everything loads properly locally but Heroku for some reason won't upload my latest changes, it shows an older version of what I'm working on. When I used:
$ Heroku logs --tail
I found this error in there:
←[33m2014-01-23T23:56:04.974299+00:00 heroku[router]:←[0m at=error code=H10 desc
="App crashed" method=GET path=/ host=omr-pinterestingx.herokuapp.com request_id
=ffc60e1c-0ffa-4255-b65f-f756b8518a9d fwd="108.227.81.48" dyno= connect= service
= status=503 bytes=
←[33m2014-01-23T23:56:10.559839+00:00 heroku[router]:←[0m at=error code=H10 desc
="App crashed" method=GET path=/ host=omr-pinterestingx.herokuapp.com request_id
=59e9b60a-bec4-4af4-937c-f8bae39562ac fwd="108.227.81.48" dyno= connect= service
= status=503 bytes=
←[33m2014-01-23T23:56:14.323812+00:00 heroku[router]:←[0m at=error code=H10 desc
="App crashed" method=GET path=/ host=omr-pinterestingx.herokuapp.com request_id
=5f5402a3-00dd-4b60-abdf-bfa71fa7bc72 fwd="108.227.81.48" dyno= connect= service
= status=503 bytes=
←[33m2014-01-23T23:56:23.453814+00:00 heroku[router]:←[0m at=error code=H10 desc
="App crashed" method=GET path=/ host=omr-pinterestingx.herokuapp.com request_id
=75220541-da5d-419f-922a-2316cd6d33dd fwd="108.227.81.48" dyno= connect= service
= status=503 bytes=
I have no idea what this means, is there a problem with my Heroku configuration?
Without more details on the changes, it is hard to say why your latest version crashed on deployment. A common cause is forgetting your database migration. Have you tried this?
heroku run rake db:migrate
Another common problem is forgetting to commit and push Gemfile and Gemfile.lock.
Or maybe, since you're developing on Windows, follow the instructions here to deal with the Gemfile issues that arise when deploying a Ruby project generated on Windows. You can also try deleting these lines (or similar) from your Gemfile.lock:
PLATFORMS
x86-mingw32
Otherwise, scroll up in the logs to see if you can spot a stack trace or a sneaky line like "Missing gem."
Related
I recently have cloned my github repo of a working (first release) web app to a new directory and a new user on my computer. The web app is hosted at Heroku.
I have made some changes, push them to origin, and then pushed them to Heroku and the web app crashes. The changes are exceedingly minor and will not affect anything backend or complicated.
Heroku says the build was successful, there there did exist a perculiar warning:
###### WARNING:
Detecting rails configuration failed
set HEROKU_DEBUG_RAILS_RUNNER=1 to debug
###### WARNING:
We detected that some binary dependencies required to
use all the preview features of Active Storage are not
present on this system.
For more information please see:
https://devcenter.heroku.com/articles/active-storage-on-heroku
No idea on what and where they mean by set HEROKU_DEBUG_RAILS_RUNNER=1 to debug
The error logs I get during the crash are:
...
2019-06-01T07:14:31.564617+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/training_sessions/345" host=www.trainingrepo.com request_id=ed87114f-a296-4a84-adba-57f7249d3ea9 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:32.159379+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=www.trainingrepo.com request_id=990ffa88-1d6b-4e38-af9b-521b2dff6fa8 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:41.170353+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=www.trainingrepo.com request_id=14e1d219-30e5-4b87-96cf-3ea9378c13e1 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:41.642669+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=www.trainingrepo.com request_id=54ad17ed-5e6c-44ff-818a-f7e4fcd6720a fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:44.421786+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/training_sessions/345" host=www.trainingrepo.com request_id=418bea73-f5b8-44bf-8233-6751b481d671 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:44.724359+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=www.trainingrepo.com request_id=a6226248-404a-4a25-8144-7bf923c362d1 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:16:15.084500+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=training-repo.herokuapp.com request_id=aeb650e9-57bb-4d60-b095-cc426a2f7a48 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=https
2019-06-01T07:16:15.468246+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=training-repo.herokuapp.com request_id=17442b02-84a1-4e2d-a3d2-04f26e2bd8ef fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=https
You'll notice that the dyno= connect= service= are all empty. When I rant the production check, it was a blood bath:
PASSED Heroku-18 Stack
FAILED Hobby Dynos
You're running on Hobby dynos. Upgrading to Standard tier dynos will provide a higher level of performance and access to important features such as metrics and faster builds. Upgrading to Performance will provide single tenant isolation for highest performance. Visit your app's resources tab to upgrade.
FAILED Dyno Redundancy
You're only running on 1 web dyno. A second dyno will provide instant fallback if one dyno fails for any reason. Scale your dynos to 2 or more on the Resources tab.
FAILED Production Postgres Database
Using a Hobby Tier Postgres database. Upgrade to a Standard or Premium Tier database for production-grade availability.
WARNING Postgres High Availability
Using a Hobby Tier Postgres database. Upgrade to a Premium Tier database for High Availability.
FAILED App monitoring
Not using an app monitoring add-on. Install a monitoring add-on such as New Relic or Librato to monitor your app's performance.
FAILED Log monitoring
No logging add-on found. Install a logging add-on such as Papertrail,or Logentriesto monitor and search your logs.
WARNING Custom Maintenance Pages
Configure customized error and maintenance pages to match your app's branding.
PASSED Heroku SSL
Also of note: I cannot connect to my DB locally - I am guessing it has something to do with me trying to access it from a new user account on my computer - but I am an imbecile
Very hard to say what's going on without looking at your code, but this line is very telling: Detecting rails configuration failed. For a normal Rails app that should never happen. The other stuff in semi-optional configuration.
You could try checking if you've pushed the wrong folder level - either one step too high or low. Make sure you push the RAILS_ROOT folder - the one with the Gemfile in it. If you open your project on Github you should see the Gemfile listed directly in the first screen.
please help, i have no idea. I am getting this from my heroku logs.
i am on ruby 2.3
rails 5.1
2019-03-20T15:05:15.000000+00:00 app[api]: Build succeeded
2019-03-20T15:05:53.943996+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=aqueous-reef-51265.herokuapp.com request_id=5c0b7d49-b20e-4469-a483-88093fd77f5e fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
2019-03-20T15:05:54.781463+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=aqueous-reef-51265.herokuapp.com request_id=de8a1df2-fc24-4e69-8b36-7cb1e92a73da fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
2019-03-20T15:05:58.794279+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=aqueous-reef-51265.herokuapp.com request_id=d53446ea-a1bd-474e-ad6c-ddf62b74689f fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
2019-03-20T15:05:59.021626+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=aqueous-reef-51265.herokuapp.com request_id=63bd925f-fc04-4169-94ce-d08afd620a57 fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
^CTerminate batch job (Y/N)? y
Try to run heroku local or heroku run rails c. The first command will try to run the server locally and the second will run the rails console on your heroku server. Both of them should crash because of the error that is causing your heroku app to fail to launch, but they should provide a more detailed explanation as to the cause. I have seen this error a couple times before and one time it was because I wasn't autoloading classes correctly, i.e require 'devise in application.rb and the other time it was because there was an error in a controller class name.
I have my Rails app deployed, but when I go to open it, I get this error in my web browser :
Application error
An error occurred in the application and your page could not beserved. If you are the application owner, check your logs for details.
Here are my log errors:
2018-03-19T04:48:12.360662+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=marmelade1.herokuapp.com
request_id=613511e2-940f-4aac-8f42-7fa7f85a8a76 fwd="172.90.196.64"
dyno= connect= service= status=503 bytes= protocol=https
2018-03-19T04:48:31.712091+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=marmelade1.herokuapp.com
request_id=813d50a1-8cee-4a57-81d5-b9f303084cf6 fwd="172.90.196.64"
dyno= connect= service= status=503 bytes= protocol=https
2018-03-19T04:48:32.039194+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico"
host=marmelade1.herokuapp.com
request_id=854ceb16-62c4-430e-9771-d64bb334f006 fwd="172.90.196.64"
dyno= connect= service= status=503 bytes= protocol=https
2018-03-19T05:01:26.721459+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=marmelade1.herokuapp.com
request_id=e112728e-af23-48c1-aef2-c2fd995466dd fwd="172.90.196.64"
dyno= connect= service= status=503 bytes= protocol=https
What am I doing wrong?
I experienced the same error. Rails 6.1.4.1 ruby 2.7.1p83
I ran $ heroku run rails console
Below was the error at the bottom of the terminal: Error loading the 'postgresql' Active Record adapter. Missing a gem it depends on? can't activate pg (~> 1.1), already activated pg-0.18.4. Make sure all dependencies are added to Gemfile. (LoadError)
I updated the postgresql gem version from 0.18.1 to 1.1 in my gem file, pushed the changes to heroku and the issued was fixed.
It's now been 48 hours since my heroku app has started crashing.
I don't honestly know what is making it crash, i've tried restarting it, changing the dynos and running heroku run rake db:migrate but none of these seem to work.
These are my heroku logs
at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=serene-savannah-7550.herokuapp.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
2013-08-27T12:51:50+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_BLACK measure.current_transaction=26940 measure.db_size=56841336bytes measure.tables=23 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.85317 measure.table-cache-hit-rate=0.99704
2013-08-27T12:52:45+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_BLACK measure.current_transaction=26940 measure.db_size=56841336bytes measure.tables=23 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.85317 measure.table-cache-hit-rate=0.99704
2013-08-27T12:53:34.027760+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=www.website.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
2013-08-27T12:54:35.129270+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=www.website.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
2013-08-27T12:54:36+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_BLACK measure.current_transaction=26940 measure.db_size=56841336bytes measure.tables=23 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.99998 measure.table-cache-hit-rate=1
2013-08-27T12:55:15.018337+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=www.website.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
I have tried changing to 2 Dynos x1 and 1 Dyno x2 but it doesnt change anything
I have PostgreSQL Crane installed and set as my DATABASE_URL.
Why is it crashing and how could I fix this annoying error?
Thanks
It looks like your app is repeatedly crashing (but you already knew that). Have you created migrations that haven't been run, yet?
Try heroku run bundle exec rake db:migrate.
If that doesn't work, try running the Rails console on Heroku to help diagnose the issue. Run heroku run bundle exec rails console.
My app had been running for over 24 hours with no problem.
I decided to try and add a custom domain to my site. I followed the instructions and then went to my godaddy panel and changed the www from # to mysite.heroku.com
I went to sleep and when I woke up this morning I get this error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details."
After checking the logs this is what I see
2013-03-02T10:22:24+00:00 heroku[web.1]: Process exited with status 1
2013-03-02T10:22:24+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-02T10:22:25+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-02T10:22:26+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-02T10:22:39+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-02T10:22:39+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
I am fairly new to ruby on rails and heroku so I have no idea how to fix this error.
I also deleted the custom domain and changed everything back to normal in my godaddy panel yet I still get this error.
I tried to push the newest version of my code and that did not make any difference.
Did you execute heroku run rake db:migrate after deploying your app?
GoDaddy can be a pain in the ass, and I second what dev said above^. It can take a day or two to load properly, so looking for the source of the problem on that end can be unreliable.
Check to make sure everythings running correctly on Heroku's side for your app.
Heroku's Status looks OK, https://status.heroku.com/.
Your app hasn't crashed when locally testing has it? http:// localhost:3000/whatever
Check your gems, others seem to have a similar issue. link