You can try to run  ngrep -qW byline port 3306 at kamailio server<br>and see if there are any errors, you should also use tcpdump and see if there are<br>any rejects on IP level.<br><br><br><br><br><br><div class="gmail_quote">
On Tue, Jan 3, 2012 at 3:14 AM, Ali Jawad <span dir="ltr">&lt;<a href="mailto:ali.jawad@splendor.net">ali.jawad@splendor.net</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<br>
<br>
SeLinux is disabled, as I have played around with Children and got a<br>
stable startup at CHILDREN=3, at 4 and up I get the problem described<br>
earlier right away, so it seems that MySQL is throttling Kamailio ?<br>
<br>
1- What is the effect of running 3 children only ?<br>
2- I know this is not a Kamailio thing, but any idea about what needs<br>
to be changed on MySQL server to accommodate more children ? No of<br>
connections is 500 conns out of which max 120 are utilized<br>
<br>
Regards<br>
<br>
On Mon, Jan 2, 2012 at 1:31 PM, Daniel-Constantin Mierla<br>
&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt;<br>
&gt; On 1/2/12 12:24 PM, Ali Jawad wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Daniel<br>
&gt;&gt; Running on a LAN with no firewalls enabled,<br>
&gt;<br>
&gt;<br>
&gt; limits can be from kernel, selinix, mysql server  a.s.o. not only from<br>
&gt; firewalls.<br>
&gt;<br>
&gt;<br>
&gt;&gt;  will try you suggestion<br>
&gt;&gt; though first thing tomorrow morning, what are the implications of<br>
&gt;&gt; running children=1 ?<br>
&gt;<br>
&gt;<br>
&gt; This will create only one worker process (not advisable for production in<br>
&gt; long term, just for testing) -- in this way there should be very few mysql<br>
&gt; connections opened, revealing if there is a problem or not with the number<br>
&gt; of connections and the short period to create them.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Daniel<br>
&gt;<br>
&gt;&gt; Thanks<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Jan 2, 2012 at 2:03 PM, Daniel-Constantin Mierla<br>
&gt;&gt; &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;  wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hello,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; check also for limits in the system/firewall, maybe there are limits on<br>
&gt;&gt;&gt; new<br>
&gt;&gt;&gt; connections per second. Try with children=1 and see if it happens again,<br>
&gt;&gt;&gt; if<br>
&gt;&gt;&gt; not, then it is something that blocks many new connections in short time.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt; Daniel<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 1/2/12 5:31 AM, Sammy Govind wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt; Its all upto you then, that&#39;s an intermittent issue and information is<br>
&gt;&gt;&gt; not<br>
&gt;&gt;&gt; complete to trace the issue. Did you see the same Errors every time it<br>
&gt;&gt;&gt; fails<br>
&gt;&gt;&gt; !?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Regards<br>
&gt;&gt;&gt; Sammy<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Sun, Jan 1, 2012 at 10:06 PM, Ali Jawad&lt;<a href="mailto:ali.jawad@splendor.net">ali.jawad@splendor.net</a>&gt;<br>
&gt;&gt;&gt;  wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hi<br>
&gt;&gt;&gt;&gt; Thanks for your input, but as said this works at times yes and times<br>
&gt;&gt;&gt;&gt; now so I am not sure it is a definite DB issue, the servers are in the<br>
&gt;&gt;&gt;&gt; same LAN, and there are other modules that use the DB string that work<br>
&gt;&gt;&gt;&gt; when launched before this one while this one does not work.<br>
&gt;&gt;&gt;&gt; Regards<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Sun, Jan 1, 2012 at 4:13 PM, Sammy Govind&lt;<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>&gt;  wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;&gt; forget the whole list of errors and just resolve the DB connectivity<br>
&gt;&gt;&gt;&gt;&gt; between<br>
&gt;&gt;&gt;&gt;&gt; the Kamailio server and DB server first .<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 27(24762) ERROR: db_mysql [km_my_con.c:109]: driver error: Can&#39;t<br>
&gt;&gt;&gt;&gt;&gt;&gt; connect to MySQL server on &#39;xxxxxxxxx&#39; (4)<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; try connecting to the remote DB server &#39;xxxxxxxxx&#39; from linux shell i.e<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; # mysql -u&lt;user&gt;  -p&lt;passwd&gt;  -h &#39;xxxxxxxxx&#39;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt;&gt;&gt; Sammy<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Fri, Dec 30, 2011 at 3:33 PM, Ali Jawad&lt;<a href="mailto:ali.jawad@splendor.net">ali.jawad@splendor.net</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Hi All<br>
&gt;&gt;&gt;&gt;&gt;&gt; I have tried the below with Kamailio 3.1.0 and 3.2.1. the problem is<br>
&gt;&gt;&gt;&gt;&gt;&gt; that Kamailio at times fails to start up for no obvious reasons, I.e.<br>
&gt;&gt;&gt;&gt;&gt;&gt; in 10 restarts Kamailio might fail to start 3,0 or 5 times. Te debug<br>
&gt;&gt;&gt;&gt;&gt;&gt; log &quot;level 2 &quot; shows the following :<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 27(24762) ERROR: db_mysql [km_my_con.c:109]: driver error: Can&#39;t<br>
&gt;&gt;&gt;&gt;&gt;&gt; connect to MySQL server on &#39;xxxxxxxxx&#39; (4)<br>
&gt;&gt;&gt;&gt;&gt;&gt; 27(24762) ERROR:&lt;core&gt;  [db.c:303]: could not add connection to the<br>
&gt;&gt;&gt;&gt;&gt;&gt; pool27(24762) ERROR: group [group.c:211]: unable to connect to the<br>
&gt;&gt;&gt;&gt;&gt;&gt; database<br>
&gt;&gt;&gt;&gt;&gt;&gt; 27(24762) ERROR:&lt;core&gt;  [sr_module.c:889]: init_mod_child(): Error<br>
&gt;&gt;&gt;&gt;&gt;&gt; while initializing module group<br>
&gt;&gt;&gt;&gt;&gt;&gt; (/usr/local/kamailio/lib/kamailio/modules_k/group.so)<br>
&gt;&gt;&gt;&gt;&gt;&gt; 27(24762) ERROR:&lt;core&gt;  [pt.c:481]: ERROR: fork_tcp_process():<br>
&gt;&gt;&gt;&gt;&gt;&gt; init_child failed for process 27, pid 24762, &quot;tcp receiver child=1&quot;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; and then<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 30(24765) :&lt;core&gt;  [pass_fd.c:293]: ERROR: receive_fd: EOF on 45<br>
&gt;&gt;&gt;&gt;&gt;&gt;  0(24735) ALERT:&lt;core&gt;  [main.c:748]: child process 24762 exited<br>
&gt;&gt;&gt;&gt;&gt;&gt; normally, status=255<br>
&gt;&gt;&gt;&gt;&gt;&gt;  0(24735) INFO:&lt;core&gt;  [main.c:766]: INFO: terminating due to SIGCHLD<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; The problem happens on 4 different servers, I did try to compile more<br>
&gt;&gt;&gt;&gt;&gt;&gt; than once, the servers are 32 Bit CentOS 5.6. The connection to the<br>
&gt;&gt;&gt;&gt;&gt;&gt; database is monitored and there are no issues with connecting to the<br>
&gt;&gt;&gt;&gt;&gt;&gt; DB &quot;it works at times and times not for Kamailio so a user/pwd issue<br>
&gt;&gt;&gt;&gt;&gt;&gt; is not likely to cause this, manual cnnect worked&quot;, config file errors<br>
&gt;&gt;&gt;&gt;&gt;&gt; are not found.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; I did also check max no of connections on MySQL server which is set to<br>
&gt;&gt;&gt;&gt;&gt;&gt; 500 on the server and only 100 cons are used. The group module uses<br>
&gt;&gt;&gt;&gt;&gt;&gt; the same connection string as other modules  which is predefined  and<br>
&gt;&gt;&gt;&gt;&gt;&gt; there are other modules that access the db before the group module and<br>
&gt;&gt;&gt;&gt;&gt;&gt; those do not have a problem.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Please advice.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Regards<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>
&gt;&gt;&gt;&gt;&gt;&gt; list<br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt; Ali Jawad<br>
&gt;&gt;&gt;&gt; Information Systems Manager<br>
&gt;&gt;&gt;&gt; Splendor Telecom (<a href="http://www.splendor.net" target="_blank">www.splendor.net</a>)<br>
&gt;&gt;&gt;&gt; Beirut, Lebanon<br>
&gt;&gt;&gt;&gt; Phone: <a href="tel:%2B9611373725" value="+9611373725">+9611373725</a>/ext 116<br>
&gt;&gt;&gt;&gt; FAX: <a href="tel:%2B9611375554" value="+9611375554">+9611375554</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
&gt;&gt;&gt; <a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
<span class="HOEnZb"><font color="#888888">&gt;<br>
&gt; --<br>
&gt; Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
&gt; <a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
Ali Jawad<br>
Information Systems Manager<br>
Splendor Telecom (<a href="http://www.splendor.net" target="_blank">www.splendor.net</a>)<br>
Beirut, Lebanon<br>
Phone: <a href="tel:%2B9611373725" value="+9611373725">+9611373725</a>/ext 116<br>
FAX: <a href="tel:%2B9611375554" value="+9611375554">+9611375554</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>-- <br>Vitaly Nikolaev<br>