Re: Monitoring Active Connections - Mailing list pgsql-admin

From Fernando Hevia
Subject Re: Monitoring Active Connections
Date
Msg-id CAGYT1XS0EipjUNqg_F=wCxozjbgXtg85LXLVMTxrHVHe8Sjo9g@mail.gmail.com
Whole thread Raw
In response to Monitoring Active Connections  (rajan <vgmonnet@gmail.com>)
Responses Re: Monitoring Active Connections
List pgsql-admin

On Fri, Feb 5, 2016 at 2: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.


My guess would be that the deadlock caused the spike in connections, not the other way around.
 
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?


If you have log_connections enabled you will find client connections logged in PostgreSQL's log file.
 

pgsql-admin by date:

Previous
From: Keith
Date:
Subject: Re: Monitoring Active Connections
Next
From: Dave Johansen
Date:
Subject: Setting up streaming replication with new server as master?