Remove IEX console Postrex too many connections - nbw/treelib_elixir GitHub Wiki
Solution: kill all the connections using heroku pg:killall
You can preview the current connections using a dataclip
SELECT * FROM pg_stat_activity;
If there's an ip address you want to kill (ip address listed in the result from above), then run:
SELECT pg_terminate_backend(pid), host(client_addr)
FROM pg_stat_activity
WHERE host(client_addr) = 'IP ADDRESS HERE';
Helpful resource: