Perfectly working Heroku app crashed and unable to restart - heroku

My Rails app that uses Spree and is hosted on Heroku was working fine until last night but I woke up this morning to find that the app had crashed and I have no clue why. I have not made any changes recently. I tried heroku restart without success. It looks like something is up with Heroku (the log is asking me a question about whether the amazon host is running??) How do I let them know to resolve this for me?
2013-06-04T06:47:59.795210+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1076:in `initialize': could not connect to server: Connection refused (PGError)
2013-06-04T06:47:59.795659+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bundler/gems/spree-58e0391d3496/core/config/initializers/spree.rb:15:in `<top (required)>'
2013-06-04T06:47:59.795210+00:00 app[web.1]: Is the server running on host "ec2-54-243-188-56.compute-1.amazonaws.com" and accepting
2013-06-04T06:47:59.795210+00:00 app[web.1]: TCP/IP connections on port 5442?

go to http://help.heroku.com and Open a Support Ticket

Check logs from terminal
heroku logs --app <heroku app name>
check the crash stacktrace and then restart all dynos from dashboard

Related

postgres bad connection localhost

On UBUNTU, I have a ruby app with a postgresql database on my localhost.
Everything was working fine yesterday, but today my database was gone. I was still able to open the app. Then I got an error saying something like,
run rails db:migrate
After I ran the command I started getting
PG::ConnectionBad at /
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
None of the config files were changed since yesterday.
I use docker-compose up to start the server and apparently it starts the connection but I still cannot access my localhost.
What could be the problem here?
Thank you in advance
Check the logs in your DB, if the DB is running on docker as well then maybe it's not finishing the DB boot correctly.
If this is the case, run the DB container manually first with the same options as in your docker-compose and then check docker logs for that container.

Heroku ps:exec won't connect

I'm quite a newbie on heroku. So, sorry for the silly question.
My problem is, I don't know what is the error, but one thing for sure I couldn't connect through ssh to my heroku server. If possible I would like to know how to get more detailed error log or something like that. I've tried adding -v or --verbose switch to heroku command but no luck.
Bellow is the complete action I did, well, Basically I followed what is written in the heroku's site.
Here's how to connect through ssh according to heroku's tutorial site.
xxx#yyy:~/xwprog/heroku-sample-gradle1
$ heroku ps:exec
Establishing credentials... done
Connecting to web.1 on ⬢ guarded-fjord-42322...
▸ There was an error connecting to the dyno!
process currently running
xxx#yyy:~/xwprog/heroku-sample-gradle1
$ heroku ps
Free dyno hours quota remaining this month: 550h 0m (100%)
For more information on dyno sleeping and how to upgrade, see:
https://devcenter.heroku.com/articles/dyno-sleeping
=== web (Free): build/install/gradle-getting-started/bin/gradle-getting-started (1)
web.1: up 2018/03/10 16:56:04 +0700 (~ 16m ago)
Tried to run bash, but it's actually work. The downside was each time I disconnected from it, the state also got reset, and prone to get disconnected, with error message ECONNRESET: read ECONNRESET
xxx#yyy:~/xwprog/heroku-sample-gradle1
$ heroku run bash
Running bash on ⬢ guarded-fjord-42322... up, run.3587 (Free)
~ $
Thank you.

Heroku and Proximo Addon bin/proximo: line 36: exec: /app/vendor/dante/bin/socksify: cannot execute: Permission denied

I have installed Proximo Addon according to official recommendation, but it is not gonna work because of the following reason:
Starting process with command bin/proximo bundle exec thin start java -Xmx384m -Xss512k -XX:+UseCompressedOops -Dspring.profiles.active=prod -jar frontend/target/dependency/webapp-runner.jar --port 5231 frontend/target/*.war
2012-09-17T14:50:33+00:00 app[web.1]: Proxying traffic bound for 0.0.0.0/0 via Proximo host 23.21.47.211:1080
2012-09-17T14:50:33+00:00 app[web.1]: bin/proximo: line 33: /app/vendor/dante/bin/socksify: Permission denied
2012-09-17T14:50:33+00:00 app[web.1]: bin/proximo: line 33: exec: /app/vendor/dante/bin/socksify: cannot execute: Permission denied
please help me with that, thank you.
Have you tried heroku addons:remove proximo and then reinstalling with heroku addons:add proximo?
Also do you need to forward ALL outbound traffic or can you use it just for some specific API calls you make on your backend?
Does thin serve java apps? You might be able to just do
bin/proximo java -Xmx384m -Xss512k -XX:+UseCompressedOops -Dspring.profiles.active=prod -jar frontend/target/dependency/webapp-runner.jar --port 5231 frontend/target/*.war

heroku run returns "no route to host" error

I have a django project that is running on heroku. I am able to run certain heroku commands, such as heroku ps and heroku logs. When I try to use any heroku run commands, I get a no route to host error.
heroku run ls
Running ls attached to terminal... /usr/local/heroku/lib/heroku/client/rendezvous.rb:33:in `initialize': No route to host - connect(2) (Errno::EHOSTUNREACH
I am using chrome on a home wireless dsl connection, with no firewalls or anything on my end.
What can I do to use heroku run?

unknown heroku error

i am experiencing following error while trying to run application on heroku
2011-06-03T11:24:25-07:00 heroku[nginx]: GET / HTTP/1.1
2011-06-03T18:24:37+00:00 heroku[router]: Error H14 (No web processes runnig)
that's the only message i am getting, and it's not even mentioned in heroku error codes at http://devcenter.heroku.com/articles/error-codes
what could be the reason of this?
heroku restart
made it work properly again
As given on http://devcenter.heroku.com/articles/error-codes
H14 - No web processes running
This is most likely the result of scaling your web processes down to zero through the client.
$ heroku scale web=0
Use the heroku ps command to determine the state of your web processes.
If problems persists after heroku restart;
Destroy the heroku app and re-create.
Heroku restart
didn't fix the issue. I added a new line in my Gemfile (just a new line, no text) to force heroku to reinstall gems and this fixed the issue.

Resources