Anthony DeSimone
Anthony DeSimone

Reputation: 2034

Restarting Heroku database

I'm runnning a rails app on heroku with a postgres database hosted by Amazon. I tried a migration that would never end (over 40 minutes) and ran it a few too many times. Now I have 20 connections open to the database, which is the maximum, and no idea how to close those connections.

What can I do?

Upvotes: 2

Views: 2524

Answers (1)

arunagw
arunagw

Reputation: 1193

If you database is on heroku then you can kill all database connections using a heroku plugin

heroku-pg-extras

pg:killall [DATABASE]  #  terminates ALL connections

To you above command you need to install heroku-pg-extra plugin

Upvotes: 5

Related Questions