<div dir="ltr">Hello Prakash,<div><br></div><div style>This is not a solution as it might greatly affect Kamailio&#39;s ability to process SIP messages. It will work for small workloads as SIP messages will be queued in the socket buffers, but I would not recommend for any other situation except test.</div>
<div style><br></div><div style>Have you looked at the max_user_connection parameter in MySQL? This can be set globally or per user@host (see <a href="http://dev.mysql.com/doc/refman/5.0/en/user-resources.html">http://dev.mysql.com/doc/refman/5.0/en/user-resources.html</a>). </div>
<div style><br></div><div style>Marius </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 6:48 PM, Prakash N <span dir="ltr">&lt;<a href="mailto:prakash.n@tevatel.com" target="_blank">prakash.n@tevatel.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Daniel / Muhammad ,<div><br></div><div>   Thanks for your great support</div><div><br></div><div>   The problem now only got fixed ,the solution is  <font color="#ff0000">children=1 changes in kamailio.cfg</font></div>
<div>

<font color="#ff0000"><br></font></div><div><font color="#ff0000">    </font>I have tested Ubuntu 12 and Centos 5.7 both having the issue and solution will be the above</div><div><br></div><div>    I am continuing testing with Asterisk 1.8 Real time  with Kamailio and I will update you the testing result by next week</div>


<div><br></div><div>With Regards</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>N.Prakash</div></font></span><div class="HOEnZb"><div class="h5"><div><br>    <br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 1:24 AM, Muhammad Shahzad <span dir="ltr">&lt;<a href="mailto:shaheryarkh@gmail.com" target="_blank">shaheryarkh@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for insight. It is sad that many users do not give necessary logs and traces for debug even after several requests, nor they follow the advice and go for their own creativity making it very difficult to help them out. <div>




<br></div><div>In my experience the best way to learn a technology, problem or just about anything is to become a good copy cat. After repeating same thing a few times one starts to understand the concept and only then one should go for adventure of own creativity.</div>




<div><br></div><div>Anyways, i hope Prakash&#39;s problem is solved now, since i haven&#39;t seen anything new from him/her on this thread today. ;-)</div><div><br></div><div>Thank you.</div><div><div><div><br>

<br><div class="gmail_quote">

On Thu, Feb 14, 2013 at 7:20 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div>
    <br>
    <div>On 2/14/13 7:09 PM, Daniel-Constantin
      Mierla wrote:<br>
    </div>
    <blockquote type="cite">
      
      I want to add few details about some case that I encountered in
      the past. On some specific OS&#39;es, especially centos, seems to be a
      limit on the number of new connections allowed in the host. </blockquote>
    <br></div>
    To be more precise, it is about a limit on the rate of new
    connections. So the problem is when many new connections are opened
    at more or less same time. All is fine when new connections are
    opened with some delay between them.<br>
    <br>
    Cheers,<br>
    Daniel<div><div><br>
    <br>
    <blockquote type="cite">That
      results in some kamailio processes being able to connect, some
      not, with over all result of failing to start kamailio.<br>
      <br>
      For that reason, there is a config parameter that can be used to
      control the forking rate at startup:<br>
      <br>
      <a href="http://www.kamailio.org/wiki/cookbooks/devel/core#fork_delay" target="_blank">http://www.kamailio.org/wiki/cookbooks/devel/core#fork_delay</a><br>
      <br>
      In case of some kamailio process can connect and some cannot, try
      with this parameter.<br>
      <br>
      Cheers,<br>
      Daniel<br>
      <br>
      <br>
      <div>On 2/13/13 5:12 PM, Muhammad Shahzad
        wrote:<br>
      </div>
      <blockquote type="cite">
        <div>Now, we have different mysql error as well as different
          network topology,</div>
        <div><br>
        </div>
        <div>1. Kamailio IP has changed from, previously 192.168.1.170,
          now it is 192.168.1.60 as the error says.</div>
        <div><br>
        </div>
        <div><b><font color="#ff0000" size="4">Feb 14 01:41:01 192
              /usr/local/sbin/kamailio[7576]: ERROR: &lt;core&gt;
              [pt.c:350]: ERROR: fork_process(): init_child failed for
               process 7, pid 7576, &quot;udp receiver child=2 sock=<a href="http://192.168.1.60:5060/" target="_blank">192.168.1.60:5060</a>&quot;</font></b></div>
        <div><br>
        </div>
        <div>2. MySQL server has changed, previously it was 192.168.1.1,
          now its 192.168.1.170 as the error says,</div>
        <div><br>
        </div>
        <div><b><font color="#ff0000" size="4">Feb 14 01:41:01 192
              /usr/local/sbin/kamailio[7575]: ERROR: db_mysql
              [km_my_con.c:109]: driver error: Can&#39;t connect to MySQL
              server on &#39;192.168.1.170&#39; (4)</font></b></div>
        <div><br>
        </div>
        <div>3. MySQL connection error has changed, previously, &quot;Unknown
          database&quot;, now it is &quot;Can&#39;t connect to MySQL server&quot;.</div>
        <div><br>
        </div>
        <br>
        Below i am giving steps again, please carefully check them,
        <div> <br>
        </div>
        <div>1. On mysql server, make sure mysql service is running and
          listening for connections on 192.168.1.170, (make sure this ip
          is correct as well).</div>
        <div><br>
        </div>
        <div>netstat -plan | grep 3306</div>
        <div><br>
        </div>
        <div>2. On mysql server, make sure &quot;openser&quot; database is created
          and fully populated.</div>
        <div><br>
        </div>
        <div>mysql -p openser</div>
        <div>SELECT * FROM version;</div>
        <div><br>
        </div>
        <div>3. On mysql server, make sure you have user for kamailio
          service &#39;openser&#39;@&#39;192.168.1.60&#39; (make sure kamailio ip here
          is correct) is created with full permissions on &quot;openser&quot;
          database.</div>
        <div><br>
        </div>
        <div>SHOW GRANTS FOR &#39;openser&#39;@&#39;192.168.1.60&#39;;</div>
        <div><br>
          <div>4. On kamailio server, make sure you can access openser
            database using user name &quot;openser&quot; and password &quot;operserrw&quot;
            manually (make sure user name and password are correct and
            mentioned in kamailio.cfg correctly).<br>
            <br>
            mysql -u openser -h 192.168.1.170 -p openser</div>
          <div>SELECT * FROM version;</div>
          <div><br>
          </div>
          <div>5. On kamailio server, check db connection string (db
            username, password and host), start kamailio service and
            check debug logs in /var/log/message to see if kamailio is
            able to connect to mysql database. If not then repeat step
            1-4 again.<br>
            <br>
            Hope it solves the problem.<br>
            <br>
            <br>
            Thank you.<br>
            <br>
            <br>
            <div class="gmail_quote">On Wed, Feb 13, 2013 at 4:23 PM,
              Prakash N <span dir="ltr">&lt;<a href="mailto:prakash.n@tevatel.com" target="_blank">prakash.n@tevatel.com</a>&gt;</span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
                Shahzap ,
                <div><br>
                </div>
                <div>       Thanks for your detail mail </div>
                <div><br>
                </div>
                <div>       Now  i have reinstalled  other server ,still
                  i am having the same problem </div>
                <div><br>
                </div>
                <div>       If i use localhost it is working correctly
                  ,if i changed to remote sever not working( i have
                  changed DB HOST = 192.168.1.170 (remote server )</div>
                <div><br>
                </div>
                <div><span style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large">mysql

                    -u openser -h 192.168.1.170 -p -   </span><font color="#ff0000"><span style="font-family:arial,sans-serif;font-size:large">  </span><span style="font-family:arial,sans-serif;font-size:large">I can able to
                      connect</span></font><span style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large"> </span></div>
                <div><span style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large"><br>
                  </span></div>
                <div><span style="color:rgb(0,153,0);font-family:arial,sans-serif;font-size:large"><br>
                  </span></div>
                <div>SHOW GRANTS FOR &#39;openser&#39;@&#39;192.168.1.170&#39;;  it is
                  also granted</div>
                <div><br>
                </div>
                <div>Output </div>
                <div>
                  <div>+--------------------------------------------------------------------------------------------------------------------+</div>
                  <div>| Grants for <a href="mailto:openser@192.168.1.170" target="_blank">openser@192.168.1.170</a>        
                                                                       
                                          |</div>
                  <div>+--------------------------------------------------------------------------------------------------------------------+</div>
                  <div>| GRANT USAGE ON *.* TO &#39;openser&#39;@&#39;192.168.1.170&#39;
                    IDENTIFIED BY PASSWORD
                    &#39;*6A673AEF9A79D8A0A4A11EE2FCDCA705FAEC1AE4&#39; |</div>
                  <div>| GRANT ALL PRIVILEGES ON `openser`.* TO
                    &#39;openser&#39;@&#39;192.168.1.170&#39;                          
                                            |</div>
                  <div>+--------------------------------------------------------------------------------------------------------------------+</div>
                  <div>2 rows in set (0.00 sec)</div>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><b><font color="#ff0000" size="4">My error messages
                       :</font></b></div>
                <div><b><font color="#ff0000" size="4"><br>
                    </font></b></div>
                <div><b><font color="#ff0000" size="4">
                      <div> kamailio: WARNING: &lt;core&gt;
                        [socket_info.c:1392]: WARNING: fix_hostname:
                        could not rev. resolve 192.168.1.60</div>
                      <div>Feb 14 01:40:58 192 kamailio: WARNING:
                        &lt;core&gt; [socket_info.c:1392]: WARNING:
                        fix_hostname: could not rev. resolve
                        192.168.1.60</div>
                      <div>Feb 14 01:40:58 192 kamailio: INFO:
                        &lt;core&gt; [tcp_main.c:4832]: init_tcp: using
                        epoll_lt as the io watch method (auto detected)</div>
                      <div>Feb 14 01:40:58 192
                        /usr/local/sbin/kamailio[7569]: INFO: usrloc
                        [hslot.c:53]: locks array size 512</div>
                      <div>Feb 14 01:40:58 192
                        /usr/local/sbin/kamailio[7569]: INFO: auth
                        [auth_mod.c:329]: auth: qop set, but nonce-count
                        (nc_enabled) support disabled</div>
                      <div>Feb 14 01:40:59 192
                        /usr/local/sbin/kamailio[7569]: INFO:
                        &lt;core&gt; [udp_server.c:179]: INFO: udp_init:
                        SO_RCVBUF is initially 229376</div>
                      <div>Feb 14 01:40:59 192
                        /usr/local/sbin/kamailio[7569]: INFO:
                        &lt;core&gt; [udp_server.c:230]: INFO: udp_init:
                        SO_RCVBUF is finally 262142</div>
                      <div>Feb 14 01:40:59 192
                        /usr/local/sbin/kamailio[7569]: INFO:
                        &lt;core&gt; [udp_server.c:179]: INFO: udp_init:
                        SO_RCVBUF is initially 229376</div>
                      <div>Feb 14 01:40:59 192
                        /usr/local/sbin/kamailio[7569]: INFO:
                        &lt;core&gt; [udp_server.c:230]: INFO: udp_init:
                        SO_RCVBUF is finally 262142</div>
                      <div>Feb 14 01:41:00 192 avahi-daemon[5122]:
                        Withdrawing address record for 192.168.1.60 on
                        eth0.</div>
                      <div>Feb 14 01:41:00 192 avahi-daemon[5122]: Host
                        name conflict, retrying with &lt;192-165&gt;</div>
                      <div>Feb 14 01:41:00 192 avahi-daemon[5122]:
                        Registering new address record for
                        fe80::a00:27ff:feea:b793 on eth0.*.</div>
                      <div>Feb 14 01:41:00 192 avahi-daemon[5122]:
                        Registering new address record for 192.168.1.60
                        on eth0.IPv4.</div>
                      <div>Feb 14 01:41:00 192 avahi-daemon[5122]:
                        Registering HINFO record with values
                        &#39;X86_64&#39;/&#39;LINUX&#39;.</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7575]: ERROR: db_mysql
                        [km_my_con.c:109]: driver error: Can&#39;t connect
                        to MySQL server on &#39;192.168.1.170&#39; (4)</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7575]: ERROR:
                        &lt;core&gt; [db.c:320]: could not add
                        connection to the pool</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7575]: ERROR: auth_db
                        [authdb_mod.c:174]: unable to connect to the
                        database</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7575]: ERROR:
                        &lt;core&gt; [sr_module.c:896]:
                        init_mod_child(): Error while initializing
                        module auth_db
                        (/usr/local/lib64/kamailio/modules_k/auth_db.so)</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7575]: ERROR:
                        &lt;core&gt; [pt.c:350]: ERROR: fork_process():
                        init_child failed for  process 6, pid 7575, &quot;udp
                        receiver child=1 sock=<a href="http://192.168.1.60:5060" target="_blank">192.168.1.60:5060</a>&quot;</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7576]: ERROR: db_mysql
                        [km_my_con.c:109]: driver error: Can&#39;t connect
                        to MySQL server on &#39;192.168.1.170&#39; (4)</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7576]: ERROR:
                        &lt;core&gt; [db.c:320]: could not add
                        connection to the pool</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7576]: ERROR: auth_db
                        [authdb_mod.c:174]: unable to connect to the
                        database</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7576]: ERROR:
                        &lt;core&gt; [sr_module.c:896]:
                        init_mod_child(): Error while initializing
                        module auth_db
                        (/usr/local/lib64/kamailio/modules_k/auth_db.so)</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7576]: ERROR:
                        &lt;core&gt; [pt.c:350]: ERROR: fork_process():
                        init_child failed for  process 7, pid 7576, &quot;udp
                        receiver child=2 sock=<a href="http://192.168.1.60:5060" target="_blank">192.168.1.60:5060</a>&quot;</div>
                      <div>Feb 14 01:41:01 192
                        /usr/local/sbin/kamailio[7576]: : &lt;core&gt;
                        [main.c:1625]: main_loop: Cannot fork</div>
                      <div><br>
                      </div>
                    </font></b></div>
              </blockquote>
            </div>
          </div>
        </div>
      </blockquote>
      <br>
      <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a href="http://conference.kamailio.com" target="_blank">http://conference.kamailio.com</a> -</pre>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a href="http://conference.kamailio.com" target="_blank">http://conference.kamailio.com</a> -</pre>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div></div></div><div>-- <br><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">




<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">------------------------------</span><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">-----</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">




<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">

<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">

<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85</a></span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">


<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">




<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shaheryarkh@googlemail.com</a>
</div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div><br></div>