Re: Monitoring Active Connections - Mailing list pgsql-admin

From Keith
Subject Re: Monitoring Active Connections
Date
Msg-id CAHw75vsPKuNvBV+u4FD6JjpdtOJUvSq3_dN2K8x7Bft+g5mWJw@mail.gmail.com
Whole thread Raw
In response to Monitoring Active Connections  (rajan <vgmonnet@gmail.com>)
List pgsql-admin
Ensure you have "log_connections" and "log_disconnections" set to "on" in your postgresql.conf. This will add the connection info to your postgres logs. Keep in mind if you have a very high connection rate, this can cause a very noticeable increase in your log size. If you did not have these turned on before, there's nothing I'm aware of within the database itself that tracks connections in the manner you're looking for. pg_stat_activity only shows what is happening right at that moment when you query it.

On Fri, Feb 5, 2016 at 12:24 PM, rajan <vgmonnet@gmail.com> wrote:
Hello,

I have a scenario in which a deadlock occurred following an unusual increase
in Number of Active Connections to the database.

In an hour, the Active Connection shooted up to 250 from 1 and it came back
to normal by the end of the hour. At that time the deadlock occurred.
Deadlock information contains a relation id and two pids, both of them are
NOT traceable.

Now I want to analysed what would have caused an unsual number of increase
in the number of Active Connections, I can't get any data out of
pg_stat_activity. Now the total number of connections is 75 only. Will there
be any log from which I can get those queries or connection details?

Can anybody help me on this?



-----
--
Thanks,
Rajan.
--
View this message in context: http://postgresql.nabble.com/Monitoring-Active-Connections-tp5886073.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

pgsql-admin by date:

Previous
From: rajan
Date:
Subject: Monitoring Active Connections
Next
From: Fernando Hevia
Date:
Subject: Re: Monitoring Active Connections