You have an error reloading the database; this is not a database problem. There are too many connections in your application, possibly because you forgot to configure the connection pool. This is not a database server problem, and you can fix it without restarting the database server.
If you stop the Play application or reconfigure its connection pool, the problem will disappear.
Another option is to put the Heroku instance in maintenance mode and then take it out again.
Since heroku does not allow you to connect as a superuser (for good reasons), you cannot use this reserved superuser slot to connect and manage connections, as with regular PostgreSQL.
See also:
Heroku "psql: FATAL: the remaining connection slots are reserved for superuser connections without replication
http://wiki.postgresql.org/wiki/Number_Of_Database_Connections
If you are not the hero who found this:
With regular PostgreSQL, you can disconnect your client from the back of the server using the PostgreSQL connection to your server. See how it says about the slot reserved for "superuser connections"? Connect to Pg as superuser (default postgres user) using PgAdmin-III or psql .
After connecting, you can see other clients using
SELECT * FROM pg_stat_activity;
If you want to complete each connection except your own, you can run:
SELECT procpid, pg_terminate_backend(procpid) FROM pg_stat_activity WHERE procpid <> pg_backend_pid();
Add AND datname = current_database and / or AND usename = <target-user-name> , if necessary.
source share