Hello all,
I have a problem with at least one of my apps. There are a group of 6-8 apps that all connect to the local PostgreSQL database. Over time, at least one is connecting to the db but not closing the connection. These instances are adding up to the point where the Postgre has reached its 100 limit. I understand that this 100 can be increased, but since there is an obvious issue with at least one app, I’d rather track that down and correct it.
Using this SQL Code:
select * from
(select count(*) used from pg_stat_activity) q1,
(select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) q2,
(select setting::int max_conn from pg_settings where name=$$max_connections$$) q3;
Using this code in the Terminal I get this:
But none of these shows which app is creating the connection and not releasing. They are all using the same Login ID and Password for Postgres, which is making it harder. But I was hoping that someone may have some other ideas.
Thanks,
Tim