<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Texte de bulles Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;}
span.TextedebullesCar
        {mso-style-name:"Texte de bulles Car";
        mso-style-priority:99;
        mso-style-link:"Texte de bulles";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="FR-CH" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yes I check them, the only 2 point that I have actually not tested is to change :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">- You might have to decrease TCP_BUF_SIZE to a smaller value (e.g 8K)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">- You might want to increase PKG_MEM_POOL_SIZE (for large queues)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m using Kamailio 3.2.1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I have set:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">tcp children to 50<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">tcp_max_connections=104096<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">started wit  -m 4096  -M 64<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">with sockstat I have:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">sockets: used 2171<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">TCP: inuse 913 orphan 1 tw 4 alloc 939 mem 29<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">UDP: inuse 440 mem 372<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">UDPLITE: inuse 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">RAW: inuse 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">FRAG: inuse 0 memory 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">BR<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Laurent<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">De :</span></b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> sr-users-bounces@lists.sip-router.org
 [mailto:sr-users-bounces@lists.sip-router.org] <b>De la part de</b> Daniel-Constantin Mierla<br>
<b>Envoyé :</b> mardi 9 septembre 2014 14:46<br>
<b>À :</b> Kamailio (SER) - Users Mailing List<br>
<b>Objet :</b> Re: [SR-Users] TCP SYN only<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello,<br>
<br>
have you checked the file in the sources located at doc/tcp_tunning.txt?<br>
<br>
Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 09/09/14 14:40, Laurent Schweizer wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><span style="color:#1F497D">Dear all,</span><o:p></o:p></pre>
<pre><span style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D">Since few weeks I have more and more TCP issue, I can see that sometimes the client send a TCP SYN but never get any response. </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">106.123315 62.12.179.104 -> X.X.X.X  TCP 39174 > sip [SYN] Seq=0 Win=4380 Len=0 MSS=1380 TSV=4294942209 TSER=0 WS=1</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">109.124384 62.12.179.104 -> X.X.X.X  TCP 39174 > sip [SYN] Seq=0 Win=4380 Len=0 MSS=1380 TSV=4294942510 TSER=0 WS=1</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">111.202946 62.12.179.104 -> X.X.X.X  TCP 4993 > sip [SYN] Seq=0 Win=4380 Len=0 MSS=1380 TSV=4294942717 TSER=0 WS=1</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">114.204707 62.12.179.104 -> X.X.X.X  TCP 4993 > sip [SYN] Seq=0 Win=4380 Len=0 MSS=1380 TSV=4294943018 TSER=0 WS=1</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D">I have found on internet many doc regarding TCP and max connection issue and I have already done change in sysctl (see below) to increase the number of tcp connection but seems still not ok.</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D">Any idea ?</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D">Best regards</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D">Laurent</span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.ip_forward = 0</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.conf.default.rp_filter = 1</span></i><o:p></o:p></pre>
<pre><i><span style="font-size:8.0pt;color:#1F497D">net.ipv4.conf.default.accept_source_route = 0</span></i><o:p></o:p></pre>
<pre><i><span style="font-size:8.0pt;color:#1F497D">kernel.sysrq = 0</span></i><o:p></o:p></pre>
<pre><i><span style="font-size:8.0pt;color:#1F497D">kernel.core_uses_pid = 1</span></i><o:p></o:p></pre>
<pre><i><span style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_syncookies = 0</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.bridge.bridge-nf-call-ip6tables = 0</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.bridge.bridge-nf-call-iptables = 0</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.bridge.bridge-nf-call-arptables = 0</span></i><o:p></o:p></pre>
<pre><i><span lang="DE-CH" style="font-size:8.0pt;color:#1F497D">kernel.msgmnb = 65536</span></i><o:p></o:p></pre>
<pre><i><span lang="DE-CH" style="font-size:8.0pt;color:#1F497D">kernel.msgmax = 65536</span></i><o:p></o:p></pre>
<pre><i><span lang="DE-CH" style="font-size:8.0pt;color:#1F497D">kernel.shmmax = 68719476736</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">kernel.shmall = 4294967296</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_timestamps = 1</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_fin_timeout = 30</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_keepalive_time = 1200</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_max_syn_backlog = 8192</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_max_tw_buckets = 5000</span></i><o:p></o:p></pre>
<pre><i><span style="font-size:8.0pt;color:#1F497D">fs.file-max = 2097152</span></i><o:p></o:p></pre>
<pre><i><span style="font-size:8.0pt;color:#1F497D">net.ipv4.ip_local_port_range = 2000 65535</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_max_tw_buckets = 1440000</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_tw_recycle = 1</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.ipv4.tcp_tw_reuse = 1</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.core.somaxconn = 65536</span></i><o:p></o:p></pre>
<pre><i><span lang="EN-US" style="font-size:8.0pt;color:#1F497D">net.core.netdev_max_backlog = 65536</span></i><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<pre><span lang="EN-US" style="color:#1F497D"> </span><o:p></o:p></pre>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<o:p></o:p></pre>
<pre><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><o:p></o:p></pre>
<pre><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla<o:p></o:p></pre>
<pre><a href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre>
<pre>Next Kamailio Advanced Trainings 2014 - <a href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre>
<pre>Sep 22-25, Berlin, Germany<o:p></o:p></pre>
</div>
</body>
</html>