Re: Postgres connections optimization #4342

Giovanni Maruzzelli via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <CALXCt0odifcJwUya5Kh99kTFdCvnZwjG123fCGg2cfXje+pquA@mail.gmail.com>
You can put a pgbouncer in front of postgres

That pgbouncer will multiplex all incoming db connections  into one
(connected to pgsql)

pgbouncer will listen on standard pgsql port, and you change the config of
pgsql so it listen on a modified port or local socket only (pointed by the
pgbouncer config)

This way you will have a very tiny impact on the overall platform, just add
pgbouncer on the pgsql machine, and change the port pgsql listen to (or
limit it to listen on local socket)



Sincerely,

Giovanni Maruzzelli
OpenTelecom.IT
cell: +39 347 266 56 18


On Wed, Jul 30, 2025, 10:55 Stephane Savonitto via sr-users <
[email protected]> wrote:

> Hi,
>
> Thanks for your feedback. Could you tell me how many permanent connections
> are established based on your setup ? I’ve checked and didn’t found any
> code update related to connection pool, do you think this could be a
> feature request ?
>
> Regards,
>
> Stéphane
>
>
>
> *De : *Henning Westerholt <[email protected]>
> *Date : *mercredi, 30 juillet 2025 à 09:07
> *À : *Kamailio (SER) - Users Mailing List <[email protected]>
> *Cc : *Stephane Savonitto <[email protected]>
> *Objet : *RE: Postgres connections optimization #4342
>
> Vous n’obtenez pas souvent d’e-mail à partir de [email protected]. Pourquoi
> c’est important <https://aka.ms/LearnAboutSenderIdentification>
>
> Hello,
>
>
>
> have a look to the actual source of the connections (kamailio PID etc..).
> In many cases a lot of connections are created during startup and then
> should expire after some time, because they are not used. The only
> connections that should stay are from the processed processing actual
> traffic on external interfaces etc. This is at least the behaviour on MySQL.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> *From:* Stephane Savonitto via sr-users <[email protected]>
> *Sent:* Dienstag, 29. Juli 2025 17:51
> *To:* [email protected]
> *Cc:* Stephane Savonitto <[email protected]>
> *Subject:* [SR-Users] Postgres connections optimization #4342
>
>
>
> Hello,
>
> On P-CSCF when running we have 200+ permanent connection to postgres db,
> even if there is no traffic. Is there a way to manage connections
> dynamically using a pool like using PgBouncer ?
>
>
>
> Regards,
>
> Stéphane
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions --
> [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
>

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.