Re: Big number of connections

From: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Big number of connections
Date: 2016-04-04 15:00:45
Message-ID: 5702819D.3000700@evolu-s.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Il 04/04/2016 16:54, Artem Tomyuk ha
scritto:<br>
</div>
<blockquote
cite="mid:CANYYVqKn9i9kkmxCBwUcd6g5FbgXmTBRxYrAVD2p6wLgLh4BrA(at)mail(dot)gmail(dot)com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-04-04 17:43 GMT+03:00 Moreno
Andreo <span dir="ltr">&lt;<a moz-do-not-send="true"
href="mailto:moreno(dot)andreo(at)evolu-s(dot)it" target="_blank">moreno(dot)andreo(at)evolu-s(dot)it</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div id=":3ii" class="" style="overflow:hidden">s there a
way to monitor active connections, or at least to report
when they grow too much?<br>
(say, I have an 8-core system and want to track down if,
and when, active connections grow over 80)</div>
</blockquote>
</div>
<br>
You can achieve that just running simple query like<br>
<span class="">select</span><span class=""> count(*) </span><span
class="">from</span><span class=""> pg_stat_activity </span><span
class="">where</span><span class=""> state = </span><span
class="">'active'</span> </div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
</div>
</blockquote>
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!" :-)<br>
<br>
Cheers,<br>
Moreno.-<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.0 KB

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Artem Tomyuk 2016-04-04 15:03:57 Re: Big number of connections
Previous Message Artem Tomyuk 2016-04-04 14:54:46 Re: Big number of connections