<div dir="ltr">Hi Andreas,<div>Thanks for the info.<br>I did the configuration you suggested, but the QGis was very slow. I'll see what I can configure inside PGBouncer to minimize this amount of connections.<br>Thank you all for the support and guidance.</div><div><br></div><div>Best<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="2" face="tahoma, sans-serif" color="#0b5394">Maurício Vieira Cardoso Filho<br>Gerente TI Infra<br>Tel: +556137995051<br>email : <a href="mailto:mcardoso@topocart.com.br" target="_blank">mcardoso@topocart.com.br</a>;<br>skype: mauricio.cardoso1974</font><br></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua., 9 de mar. de 2022 às 09:17, Andreas Neumann <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi,</p>
<p>Yes, you can limit the nr of CPU cores that render in QGIS - and this will limit the PG connections.</p>
<p>Menu "Settings" --> "Options" --> "Rendering".</p>
<p>If you disable the checkbox "Render layers in parallel using many CPU cores", this will force QGIS to go single threaded for drawing - or you can use the setting to the right of it and set it to use max 2 CPU cores, which will restrict it to two connectsions max.</p>
<p>The much better solution, however, would be to use a connection pool solution (like pgBouncer). Then the idle connections will be temporarily disconnected from the PG server. See the pgBouncer documentation.</p>
<p>Greetings,</p>
<p>Andreas</p>
<p id="gmail-m_4970143022518723546reply-intro">On 2022-03-09 12:23, Mauricio Vieira Cardoso Filho via Qgis-user wrote:</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div id="gmail-m_4970143022518723546replybody1">
<div>
<div dir="ltr">Hi Alexandre,
<div>Thanks for the answer. Is there any way to prevent this from happening? - I ask because I have many users who connect to the postgres database through QGIS and for each user connection, it is generating five connection sessions in the database. And that has killed Postgres's performance. Is there a way to prevent QGIS from generating this amount of connections?</div>
<div> </div>
<div>Best Regards</div>
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr"><span style="color:rgb(11,83,148);font-family:tahoma,sans-serif;font-size:small">Maurício Vieira Cardoso Filho<br>Gerente TI Infra<br>Tel: +556137995051<br>email : <a href="mailto:mcardoso@topocart.com.br" rel="noreferrer" target="_blank">mcardoso@topocart.com.br</a>;<br>skype: mauricio.cardoso1974</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div>
<div dir="ltr">Em ter., 8 de mar. de 2022 às 23:36, Alexandre Neto <<a href="mailto:senhor.neto@gmail.com" rel="noreferrer" target="_blank">senhor.neto@gmail.com</a>> escreveu:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="auto">Hello Mauricio,
<div dir="auto"> </div>
<div dir="auto">That is "normal". Several different components of QGIS can establish different and independent connections to PostgreSQL. For example, the browser panel can create a connection, the database manager another, and so on.</div>
<div dir="auto"> </div>
<div dir="auto">Alexandre Neto</div>
</div>
<br>
<div>
<div dir="ltr">A terça, 8/03/2022, 20:14, Mauricio Vieira Cardoso Filho via Qgis-user <<a href="mailto:qgis-user@lists.osgeo.org" rel="noreferrer" target="_blank">qgis-user@lists.osgeo.org</a>> escreveu:</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I use QGIS 3.16 and I'm having an operation that I believe to be abnormal. I use QGIS connected to a postgres database. My problem is that QGIS is creating five simultaneous connections for each database user. (For example, when opening qgis and connecting to the bank, on my server I have five connections created with my username). Does anyone have any idea what could be happening?
<div> </div>
<div>Best<br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr"><span style="color:rgb(11,83,148);font-family:tahoma,sans-serif;font-size:small">Maurício Vieira Cardoso Filho<br>Gerente TI Infra<br>Tel: +556137995051<br>email : <a href="mailto:mcardoso@topocart.com.br" rel="noreferrer" target="_blank">mcardoso@topocart.com.br</a>;<br>skype: mauricio.cardoso1974</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>Qgis-user mailing list<br><a href="mailto:Qgis-user@lists.osgeo.org" rel="noreferrer" target="_blank">Qgis-user@lists.osgeo.org</a><br>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote>
</div>
</blockquote>
</div>
</div>
</div>
<br>
<div style="margin:0px;padding:0px;font-family:monospace">_______________________________________________<br>Qgis-user mailing list<br><a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</blockquote>
<p><br></p>
</div>
</blockquote></div>