membLoper
membLoper

Reputation: 2002

Killing abandoned console on Heroku

I have accidentally closed a Heroku console in a not-so-graceful manner. And now when I run

heroku ps --app myapp

it shows

run.8         up for 5h           bundle exec rails console
run.9         complete for 15m    bundle exec rails console
web.1         up for 4h           bundle exec unicorn -p $PORT -c ./..
web.2         up for 4h           bundle exec unicorn -p $PORT -c ./..
worker.1      up for 4h           bundle exec rake jobs:work

Any way I could close the run.8 process and stop having to pay for that one-off dyno?

Upvotes: 33

Views: 7123

Answers (3)

reillyse
reillyse

Reputation: 368

On Cedar you run

heroku ps

and get

Process State Command -------- ---------- ------------------------------------
run.1 up for 16h bundle exec rails console

then run

heroku stop run.1

to kill it

Replace run.1 with the process name from the output above e.g. it might be run.12 or web.10 for a web dyno or worker.16 for a worker.

Upvotes: 6

Brian Armstrong
Brian Armstrong

Reputation: 19863

Try

heroku ps:stop run.8

Got this from another SO answer.

Upvotes: 66

John Beynon
John Beynon

Reputation: 37507

have you tried just restarting the app - is that possible to do?

heroku restart

Upvotes: 2

Related Questions