We are using Pyramid framework for our application and are using connection pooling. Currently connection pool size is 40. Wondering how to find how many connections are used in the application? Below snippet is used to create connection pool in application
engine = create_engine(Connection_URL, pool_size=20, max_overflow=0)
Currently we are using PostgreSQL and I am querying 'pg_stat_database' table to getting number of connections from application.