Monitor Postgres pgbouncer
Pgbouncer is widely used with Postgres to provide connection pooling. Its an easy-to-use and easy-to-install piece of software. The general idea is to specify n number of connections allowed to pgbouncer and m connections allowed to Postgres itself where m is much less than n. A typical configuration is to set pgbouncer to transaction mode. This allows pgbouncer to multiplex the “real” connections to Postgres as transactions are committed or rolled back.