How can I kill all postgre connections using rails console? I am getting this:
PG::ConnectionBad
FATAL: sorry, too many clients already FATAL: sorry, too many clients already
Rails.root: C:/Users/IBM_ADMIN/Desktop/Work/Extreme Blue Summer Internship/extreme-blue
Application Trace | Framework Trace | Full Trace
activerecord (4.2.7.1) lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
activerecord (4.2.7.1) lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
activerecord (4.2.7.1) lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
activerecord (4.2.7.1) lib/active_record/connection_adapters/pos
The thing is I don't want to drop the database, but just to kill all the connections to it? Any help will be kindly appreciated!
tgresql_adapter.rb:242:in `initialize'