My application generates idle state connections. if it exceed 20 connections my app crash. i tried to set the idle_in_transaction_session_timeout
ALTER SYSTEM SET idle_in_transaction_session_timeout = '10min';
but
show idle_in_transaction_session_timeout;
as the result gives 0. How to inspect what part on my app generates idle connections and how to automate terminating idle connections on postgres? i use flask and sqlalchemy.