postgres: too many connections -> remove them all

I’m hitting this issue of seeing that there are too many clients connected. I am trying to find a way to be able to connect to the DB as an admin and remove all existing connections so that the DB is freed. What’s the right way to solve this?

Hey there,

By default, your users will receive superuser privileges so any reserved connections that may be allocated are likely in-use.

That being said, you may need to issue a restart to clear those connections.

Once you have cleared some connections, you could consider bumping your max-connections to something more appropriate for your use-case.

More information about this can be found here: Postgres config management is now available!

Let me know how that goes!