<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>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.<br>
    </p>
    <p>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).</p>
    <p>Then note that there are more processed than the value of
      children and the relation with the listen socket, for example
      timer processes.</p>
    <p>You can execute 'kamctl ps' and you will get the list of the
      processes created by kamailio with a short description about their
      purposes.</p>
    <p>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:</p>
    <p>  * the output of 'kamctl srv sockets'<br>
        * the output of 'kamctl ps'<br>
        * the list of loaded modules (enabled loadmodule lines in the
      config)<br>
        * after that, we may need extra details, like the values for
      some modparams set for couple of modules(like db_url, sqlcon, ...)<br>
    </p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 22.11.18 05:01, Karthik Srinivasan
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHUhqa9xdOHo+=zVUVu2XXfKqjPxqGteNxawM8S_8EDN40X52g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">Hello,</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif"><br>
        </div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">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?</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif"><br>
        </div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">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.</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">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.</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">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.</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif"><br>
        </div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">Basically
          wanting to know what governs the number of tcp connections a
          child process makes to a particular database server.</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif"><br>
        </div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">Thank you,</div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif"><br>
        </div>
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">Karthik</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
  </body>
</html>