Re: Big number of connections
От | Moreno Andreo |
---|---|
Тема | Re: Big number of connections |
Дата | |
Msg-id | 5702819D.3000700@evolu-s.it обсуждение исходный текст |
Ответ на | Re: Big number of connections (Artem Tomyuk <admin@leboutique.com>) |
Ответы |
Re: Big number of connections
|
Список | pgsql-performance |
<div class="moz-cite-prefix">Il 04/04/2016 16:54, Artem Tomyuk ha scritto:<br /></div><blockquote cite="mid:CANYYVqKn9i9kkmxCBwUcd6g5FbgXmTBRxYrAVD2p6wLgLh4BrA@mail.gmail.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"><<a href="mailto:moreno.andreo@evolu-s.it"moz-do-not-send="true" target="_blank">moreno.andreo@evolu-s.it</a>></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 class="" id=":3ii"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><spanclass=""> count(*) </span><span class="">from</span><span class=""> pg_stat_activity </span><spanclass="">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'dneed 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 />
В списке pgsql-performance по дате отправления: