<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you, Daniel and Mojtaba, for your responses.  </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">This was more of a curiosity factor for me as i was trying to nail down what governed the database connection count behavior.</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">The answers you have provided me are more than adequate.  No need to further debug this item;</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">I appreciate the prompt responses and I thank you again.</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<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 22, 2018 at 4:40 AM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div 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="m_8341017912989602853moz-cite-prefix">On 22.11.18 05:01, Karthik Srinivasan
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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="m_8341017912989602853mimeAttachmentHeader"></fieldset>
      <pre class="m_8341017912989602853moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="m_8341017912989602853moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_8341017912989602853moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="m_8341017912989602853moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="m_8341017912989602853moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="m_8341017912989602853moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_8341017912989602853moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="m_8341017912989602853moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="m_8341017912989602853moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a></pre>
  </div>

</blockquote></div>