Reports bugs to jira not the mailing list. Also, you did not specify your freeswitch version.<br><div class="gmail_quote"><div dir="ltr">Em qua, 7 de fev de 2018 às 09:53, Raimundo Pérez Nieves <<a href="mailto:raimundo.perez.cuba@gmail.com">raimundo.perez.cuba@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi guys, <div>Iam running outbound socket in a server, and It start perfect and receive 265 calls, which mean 265 pid created by outbound socket.</div><div>The problem is in that exactly moment, the server get memory ram out and get freezes.</div><div>I can see each pid of outbound socket there:</div><div><br></div><div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382843] [16701]     0 16701    10032      846      25        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382845] [16704]     0 16704    26451     2463      27        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382846] [16709]     0 16709    10094      898      23        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382848] [16711]     0 16711    11686     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382849] [16715]     0 16715    10067      882      23        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382851] [16720]     0 16720    11686     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382852] [16725]     0 16725    11694     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382854] [16730]     0 16730    11686     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382855] [16736]     0 16736    10094      898      23        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382857] [16738]     0 16738    11688     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382858] [16743]     0 16743    11686     2486      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382860] [16748]     0 16748    11686     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382861] [16754]     0 16754    11694     2488      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382863] [16756]     0 16756    11694     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382864] [16761]     0 16761    11686     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382866] [16766]     0 16766    10085      898      23        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382867] [16771]     0 16771    11688     2489      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382868] [16775]     0 16775    11694     2498      24        0             0 outbound_socket</div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.382870] [16777]     0 16777    11686     2498      24        0             0 outbound_socket</div></div><div style="margin:0px;font-stretch:normal;line-height:normal">And continues……</div><div style="margin:0px;font-stretch:normal;line-height:normal"><br></div><div style="margin:0px;font-stretch:normal;line-height:normal">At the end:</div><div style="margin:0px;font-stretch:normal;line-height:normal"><div style="margin:0px;font-stretch:normal;line-height:normal"><b>Feb  6 21:14:57 </b>test-server<b> kernel: [97024.383243] Out of memory: Kill process 14314 (freeswitch) score 28 or sacrifice child</b></div><div style="margin:0px;font-stretch:normal;line-height:normal">Feb  6 21:14:57 test-server kernel: [97024.384424] Killed process 14314 (freeswitch) total-vm:1282524kB, anon-rss:58856kB, file-rss:0kB</div><div style="margin:0px;font-stretch:normal;line-height:normal"><br></div><div style="margin:0px;font-stretch:normal;line-height:normal"><br></div><div style="margin:0px;font-stretch:normal;line-height:normal">I use this code.</div><div style="margin:0px;font-stretch:normal;line-height:normal"><br></div><div style="margin:0px;font-stretch:normal;line-height:normal"><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><span style="color:rgb(197,134,192)">require</span> ESL;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><span style="color:rgb(197,134,192)">use</span> IO::Socket::INET;</div><br style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$ip</span> = <span style="color:rgb(206,145,120)">"127.0.0.1"</span>;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$sock</span> = new IO::Socket::INET ( LocalHost => <span style="color:rgb(156,220,254)">$ip</span>,  LocalPort => <span style="color:rgb(206,145,120)">'8083'</span>,  Proto => <span style="color:rgb(206,145,120)">'tcp'</span>,  Listen => 1,  Reuse => 1 );</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><span style="color:rgb(197,134,192)">die</span> <span style="color:rgb(206,145,120)">"Could not create socket: </span><span style="color:rgb(156,220,254)">$!</span><span style="color:rgb(215,186,125)">\n</span><span style="color:rgb(206,145,120)">"</span> <span style="color:rgb(197,134,192)">unless</span> <span style="color:rgb(156,220,254)">$sock</span>;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><span style="color:rgb(197,134,192)">for</span>(;;) {</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$new_sock</span> = <span style="color:rgb(156,220,254)">$sock</span>->accept();</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$pid</span> = <span style="color:rgb(220,220,170)">fork</span>();</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(197,134,192)">if</span> (<span style="color:rgb(156,220,254)">$pid</span>) {</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(220,220,170)">print</span> <span style="color:rgb(206,145,120)">"New child pid </span><span style="color:rgb(156,220,254)">$pid</span><span style="color:rgb(206,145,120)"> created...</span><span style="color:rgb(215,186,125)">\n</span><span style="color:rgb(206,145,120)">"</span>;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">    <span style="color:rgb(220,220,170)">close</span>(<span style="color:rgb(156,220,254)">$new_sock</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">    <span style="color:rgb(197,134,192)">next</span>;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  }</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$fd</span> = <span style="color:rgb(220,220,170)">fileno</span>(<span style="color:rgb(156,220,254)">$new_sock</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$con</span> = new ESL::ESLconnection(<span style="color:rgb(156,220,254)">$fd</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$info</span> = <span style="color:rgb(156,220,254)">$con</span>->getInfo();</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$uuidLegB</span> = <span style="color:rgb(156,220,254)">$info</span>->getHeader(<span style="color:rgb(206,145,120)">"unique-id"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(96,139,78)">#This $uuidLegA is a temp variable where I store uuid leg A for post bridge</span></div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)"><span style="color:rgb(86,156,214)">  my</span> <span style="color:rgb(156,220,254)">$uuidLegA</span> = <span style="color:rgb(156,220,254)">$info</span>->getHeader(<span style="color:rgb(206,145,120)">"variable_outbound_caller_id_name"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$joinUUID</span> = <span style="color:rgb(206,145,120)">'resp'</span>.<span style="color:rgb(156,220,254)">$uuidLegA</span>.<span style="color:rgb(206,145,120)">'|'</span>.<span style="color:rgb(156,220,254)">$uuidLegB</span>.<span style="color:rgb(206,145,120)">' XML default'</span>;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(220,220,170)">print</span>(<span style="color:rgb(206,145,120)">"UUID Leg A is </span><span style="color:rgb(156,220,254)">$uuidLegA</span><span style="color:rgb(206,145,120)"> and B is </span><span style="color:rgb(156,220,254)">$uuidLegB</span><span style="color:rgb(215,186,125)">\n</span><span style="color:rgb(206,145,120)">"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(156,220,254)">$con</span>->events(<span style="color:rgb(206,145,120)">"plain"</span>,<span style="color:rgb(206,145,120)">"all"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(156,220,254)">$con</span>->execute(<span style="color:rgb(206,145,120)">"spandsp_start_tone_detect"</span>,<span style="color:rgb(206,145,120)">"34"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$connectedSession</span> = 1;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  </div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(197,134,192)">while</span>(<span style="color:rgb(156,220,254)">$con</span>->connected() & <span style="color:rgb(156,220,254)">$connectedSession</span> == 1) {</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">    <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$e</span> = <span style="color:rgb(156,220,254)">$con</span>->recvEvent();</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">    <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$ev_name</span> = <span style="color:rgb(156,220,254)">$e</span>->getHeader(<span style="color:rgb(206,145,120)">"Event-Name"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">    <span style="color:rgb(220,220,170)">print</span>(<span style="color:rgb(206,145,120)">"</span><span style="color:rgb(156,220,254)">$ev_name</span><span style="color:rgb(215,186,125)">\n</span><span style="color:rgb(206,145,120)">"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">    <span style="color:rgb(197,134,192)">if</span>(<span style="color:rgb(156,220,254)">$ev_name</span> <span style="color:rgb(220,220,170)">eq</span> <span style="color:rgb(206,145,120)">'DETECTED_TONE'</span>){</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">      <span style="color:rgb(86,156,214)">my</span> <span style="color:rgb(156,220,254)">$tone_name</span> = <span style="color:rgb(156,220,254)">$e</span>->getHeader(<span style="color:rgb(206,145,120)">"Detected-Tone"</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">      <span style="color:rgb(220,220,170)">print</span> <span style="color:rgb(206,145,120)">"DETECTED_TONE [</span><span style="color:rgb(156,220,254)">$tone_name</span><span style="color:rgb(206,145,120)">]</span><span style="color:rgb(215,186,125)">\n</span><span style="color:rgb(206,145,120)">"</span>;  </div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">      <span style="color:rgb(197,134,192)">if</span> (<span style="color:rgb(156,220,254)">$tone_name</span> <span style="color:rgb(220,220,170)">eq</span> <span style="color:rgb(206,145,120)">'RING_TONE'</span>) {</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">        <span style="color:rgb(156,220,254)">$command</span> = <span style="color:rgb(206,145,120)">'spandsp_stop_tone_detect '</span>.<span style="color:rgb(156,220,254)">$uuidLegB</span>;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">        <span style="color:rgb(156,220,254)">$con</span>->api(<span style="color:rgb(156,220,254)">$command</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">        <span style="color:rgb(156,220,254)">$con</span>->execute(<span style="color:rgb(206,145,120)">"transfer"</span>,<span style="color:rgb(156,220,254)">$joinUUID</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">        <span style="color:rgb(156,220,254)">$connectedSession</span> = 0;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">      } </div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">    }</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  }</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(220,220,170)">print</span> <span style="color:rgb(206,145,120)">"BYE</span><span style="color:rgb(215,186,125)">\n</span><span style="color:rgb(206,145,120)">"</span>;</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">  <span style="color:rgb(220,220,170)">close</span>(<span style="color:rgb(156,220,254)">$new_sock</span>);</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;white-space:pre-wrap;background-color:rgb(30,30,30)">}</div></div></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div>