Re: Service outage: each postgres process use the exact amount of the configured work_mem

From: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>
To: Igor Neyman <ineyman(at)perceptron(dot)com>, Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Service outage: each postgres process use the exact amount of the configured work_mem
Date: 2017-04-14 19:10:53
Message-ID: f490fb48-2c55-fc68-5adb-3a44d9c45779@evolu-s.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<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 14/04/2017 21:06, Igor Neyman ha
scritto:<br>
</div>
<blockquote
cite="mid:DM5PR07MB28108C7E9A50CB9EB3A52978DA050(at)DM5PR07MB2810(dot)namprd07(dot)prod(dot)outlook(dot)com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
tt
{mso-style-priority:99;
font-family:"Courier New";}
span.gmail-m-6686708562138806043gmail-hoenzb
{mso-style-name:gmail-m_-6686708562138806043gmail-hoenzb;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">From:</span></b><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:windowtext">
Moreno Andreo [<a class="moz-txt-link-freetext" href="mailto:moreno(dot)andreo(at)evolu-s(dot)it">mailto:moreno(dot)andreo(at)evolu-s(dot)it</a>]
<br>
<b>Sent:</b> Friday, April 14, 2017 3:00 PM<br>
<b>To:</b> Igor Neyman <a class="moz-txt-link-rfc2396E" href="mailto:ineyman(at)perceptron(dot)com">&lt;ineyman(at)perceptron(dot)com&gt;</a>;
Melvin Davidson <a class="moz-txt-link-rfc2396E" href="mailto:melvin6925(at)gmail(dot)com">&lt;melvin6925(at)gmail(dot)com&gt;</a><br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:pgsql-general(at)postgresql(dot)org">pgsql-general(at)postgresql(dot)org</a><br>
<b>Subject:</b> Re: [GENERAL] Service outage: each
postgres process use the exact amount of the configured
work_mem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><i><span style="color:red">Attention: This email was sent
from someone outside of Perceptron. Always exercise
caution when opening attachments or clicking links from
unknown senders or when receiving unexpected emails.</span></i><span
style="color:red"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Il 14/04/2017 20:40, Igor Neyman ha
scritto:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">E. How many users were connected
when the problem occurred?<o:p></o:p></p>
</div>
</div>
</blockquote>
<p class="MsoNormal">About 350 connections<br>
<br>
Thanks<br>
<br>
<span style="color:#1F497D">______________________________________________________________________________________</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Probably
that is your problem, if you don’t have connection
pooler.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">I’d
recommend to start with PgBouncer, very light-weight and
easy to configure.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Regards,</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Igor
Neyman</span><o:p></o:p></p>
<p> <o:p></o:p></p>
</blockquote>
<p>I'm building such a system, but I don't think that's the
problem because now, with 30 active connections, it still
does not work (actually it's extremely slow).<o:p></o:p></p>
<div
style="mso-element:para-border-div;border:none;border-bottom:solid
windowtext 1.5pt;padding:0in 0in 1.0pt 0in">
<p style="border:none;padding:0in">Both servers are far from
being under heavy load (so they were before...)<o:p></o:p></p>
</div>
<p><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Having
total of 350 connections and only 30 of them being active,
is the exact case where connection pooler helps.<o:p></o:p></span></p>
<p><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Igor
Neyman<o:p></o:p></span></p>
<br>
</div>
</div>
</blockquote>
Sorry, I misexplained.<br>
4 hours ago we were in rush hour and the server was running with its
usual load (graphs do not show spikes in server load), and we had
about 350 connections.<br>
To troubleshoot the whole thing, I needed to restart the servers, in
the meantime customers disconnected.<br>
Now I have 30 of them (most of them alive), select * from
pg_stat_activity shows 30 connections.<br>
That's why I don't think it's a connection # problem.<br>
<br>
<blockquote
cite="mid:DM5PR07MB28108C7E9A50CB9EB3A52978DA050(at)DM5PR07MB2810(dot)namprd07(dot)prod(dot)outlook(dot)com"
type="cite">
<div class="WordSection1">
<div> </div>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 7.5 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Neyman 2017-04-14 19:15:59 Re: Service outage: each postgres process use the exact amount of the configured work_mem
Previous Message Igor Neyman 2017-04-14 19:06:18 Re: Service outage: each postgres process use the exact amount of the configured work_mem