public inbox for [email protected]
help / color / mirror / Atom feedFrom: Artem Tomyuk <[email protected]>
To: Moreno Andreo <[email protected]>
Cc: [email protected]
Subject: Re: Big number of connections
Date: Mon, 4 Apr 2016 18:03:57 +0300
Message-ID: <CANYYVqJqM-bYf1uGyeeH_B4YgBsxJbdDaz4hVxj07f=_Oc6XVg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<DM2PR07MB557C8C149398C16068654A2DA990@DM2PR07MB557.namprd07.prod.outlook.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAFj8pRDqLJZ8M9NRKUywoQj72RUrNbsJ2nbCx=TutqxB_0rgOg@mail.gmail.com>
<[email protected]>
<CANYYVqKn9i9kkmxCBwUcd6g5FbgXmTBRxYrAVD2p6wLgLh4BrA@mail.gmail.com>
<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
there are two ways:
1. to write bash script with condition if number of conn. is > 1000 send
me email and put that script in crontab
2. monitor it with external monitoring system like zabbix, nagios etc....
2016-04-04 18:00 GMT+03:00 Moreno Andreo <[email protected]>:
> Il 04/04/2016 16:54, Artem Tomyuk ha scritto:
>
>
> 2016-04-04 17:43 GMT+03:00 Moreno Andreo <[email protected]>:
>
>> s there a way to monitor active connections, or at least to report when
>> they grow too much?
>> (say, I have an 8-core system and want to track down if, and when, active
>> connections grow over 80)
>>
>
> You can achieve that just running simple query like
> select count(*) from pg_stat_activity where state = 'active'
>
>
>
>
> Thanks, but this way I get the "sample" on that actual moment: what I'd
> need is to monitor, or to have something warning me like "Hey, You've got
> 2000 active connections! Time to grow up!" :-)
>
> Cheers,
> Moreno.-
>
>
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Big number of connections
In-Reply-To: <CANYYVqJqM-bYf1uGyeeH_B4YgBsxJbdDaz4hVxj07f=_Oc6XVg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox