What is using up my Postgres connections?

Issue

Postgres connections are being used and you want to determine the source.

Resolution

You can query the internal pg_stat_activity Postgres view to find more details on the active connections:

$ heroku pg:psql -c 'select usename, application_name, backend_start, query, wait_event, backend_type from pg_stat_activity;' --app my-app-name

This may show connection from Heroku health checks (Heroku+Postgres+-+Automation) and Postgres internal processes such as: high-availability standby replication, autovacuum worker, pglogical supervisor, WAL writer, checkpointer, background writer, etc.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2018 Salesforce.com