How to kill the kill/restart Postgres database when server is too slow
If site is slow or not loading ,please follow the instructions I sent you.
Please first check how many connections we have by running this command:
heroku pg:info -a powr
this should give you something like this:-
=== HEROKU_POSTGRESQL_BROWN_URL
Plan: Standard 4
Status: Available
Data Size: 197 GB
Tables: 144
PG Version: 11.2
Connections: 192/500
Connection Pooling: Available
Credentials: 1
Fork/Follow: Available
Rollback: earliest from 2019-03-15 08:38 UTC
Created: 2019-03-12 00:20 UTC
Region: us
Data Encryption: In Use
Continuous Protection: On
Followers: HEROKU_POSTGRESQL_BRONZE
Maintenance: not required
Maintenance window: Mondays 20:30 to Tuesdays 00:30 UTC
Add-on: postgresql-animate-68766
Make sure you are looking at HEROKU_POSTGRESQL_BROWN_URL database and its Connections, you can see its currently at 192/500
If its more than 500, or even more than 450, please run this command:-
heroku pg:killall -a powr
heroku pg:ps -a powr - look at transaction time
heroku pg:kill <pid>
heroku pg:diagnose -a powr
heroku pg:info -a powr
heroku pg:killall