[SR-Users] database connections per child process

Karthik Srinivasan ksriniva2002 at gmail.com
Fri Nov 23 05:09:16 CET 2018


Thank you, Daniel and Mojtaba, for your responses.

This was more of a curiosity factor for me as i was trying to nail down
what governed the database connection count behavior.

The answers you have provided me are more than adequate.  No need to
further debug this item;

I appreciate the prompt responses and I thank you again.

Karthik

On Thu, Nov 22, 2018 at 4:40 AM Daniel-Constantin Mierla <miconda at gmail.com>
wrote:

> Hello,
>
> in general, kamailio modules reuse the connection if the target is the
> same database server and database name. That makes it like one connection
> to database server per kamailio process.
>
> However, there are some modules that may request a dedicated database
> connection, not willing to reuse with other modules (iirc, some of the
> presence related modules should need it).
>
> Then note that there are more processed than the value of children and the
> relation with the listen socket, for example timer processes.
>
> You can execute 'kamctl ps' and you will get the list of the processes
> created by kamailio with a short description about their purposes.
>
> In other words, there is no exact formula, what we can do is to check if
> you got the expected number of connections, for that you have to provide:
>
>   * the output of 'kamctl srv sockets'
>   * the output of 'kamctl ps'
>   * the list of loaded modules (enabled loadmodule lines in the config)
>   * after that, we may need extra details, like the values for some
> modparams set for couple of modules(like db_url, sqlcon, ...)
>
> Cheers,
> Daniel
> On 22.11.18 05:01, Karthik Srinivasan wrote:
>
> Hello,
>
> Is there a formula/algorithm that determines how many TCP connections are
> made per child process to a database server defined by sqlops' sqlcon
> parameter?
>
> ex: if i have 1 database on a database server defined by sqlcon, and i
> have 1 UDP child process, i notice that the child process has made 2 TCP
> connections to the database server.
> ex: if i have 3 databases on the same database server defined by 3 sqlcon
> statements (1 pertaining to each database) and i have 4 UDP child
> processes, i notice that each child process makes 4 TCP connections to the
> database server.
> ex: if i have 3 databases on the same database server defined by 3 sqlcon
> statements (1 pertaining to each database) and i have 6 TCP child
> processes, i notice that each child process makes 4 TCP connections to the
> database server.
>
> Basically wanting to know what governs the number of tcp connections a
> child process makes to a particular database server.
>
> Thank you,
>
> Karthik
>
> _______________________________________________
> Kamailio (SER) - Users Mailing Listsr-users at lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181122/5ef7319f/attachment.html>


More information about the sr-users mailing list