From: | Keith <keith(at)keithf4(dot)com> |
---|---|
To: | rajan <vgmonnet(at)gmail(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Monitoring Active Connections |
Date: | 2016-02-05 17:43:36 |
Message-ID: | CAHw75vsPKuNvBV+u4FD6JjpdtOJUvSq3_dN2K8x7Bft+g5mWJw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmail(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Hevia | 2016-02-05 17:47:11 | Re: Monitoring Active Connections |
Previous Message | rajan | 2016-02-05 17:24:10 | Monitoring Active Connections |