<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=us-ascii"><meta name=Generator content="Microsoft Word 15 (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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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 lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It&#8217;s .Net 4.5.1 and the memory exceeds 2GB then crashes in under 3 min at 30 cps.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>How do I release the memory? I made sure I dispose of these objects<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>context.Session</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>, </span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white'>Api and (switch_event</span><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'> evt = e.FsArgs.Parameters)<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>Any help will be very appreciated.<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>Thank you,<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white'>Andre<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p>&nbsp;</o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Anthony Minessale<br><b>Sent:</b> Thursday, November 14, 2013 8:03 PM<br><b>To:</b> Freeswitch-users<br><b>Subject:</b> Re: [Freeswitch-users] Cannot queue any more events.....<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p>You're using an event consumer somewhere in a lua script or dotnet binding or something and not popping from it so it fills it up.<o:p></o:p></p><div><p class=MsoNormal>On Nov 14, 2013 4:46 PM, &quot;Andre&quot; &lt;<a href="mailto:andretodd@verizon.net">andretodd@verizon.net</a>&gt; wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>HI, I&#8217;m testing my freeswitch on Windows (1.2.14) 64 bit and I used pjsip-perf.exe --method=INVITE&nbsp; <a href="sip:2@127.0.0.1:5063">sip:2@127.0.0.1:5063</a> --count=1000 --thread=4<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>After a few hundred calls I start to get <b>Cannot queue any more events..... </b>and about 30 cps.&nbsp; A fast Bing search shows this line of code.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Anyone know what this means and how to fix it?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b>&nbsp;</b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><div style='border:solid #CCCCCC 1.0pt;padding:3.0pt 5.0pt 3.0pt 5.0pt;margin-left:1.5pt;margin-right:6.0pt'><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00040"></a><a href="http://docs.freeswitch.org/switch__cpp_8cpp.html#bf63f3ec89e7e6ace32f6898695930b1" target="_blank"><span style='text-decoration:none'>00040</span></a> static void <a href="http://docs.freeswitch.org/switch__cpp_8cpp.html#bf63f3ec89e7e6ace32f6898695930b1" target="_blank"><span style='text-decoration:none'>event_handler</span></a>(<a href="http://docs.freeswitch.org/structswitch__event.html" target="_blank"><span style='text-decoration:none'>switch_event_t</span></a> *<a href="http://docs.freeswitch.org/structdb__job.html#4802fd1cb648aae4f501dacd55325a45" target="_blank"><span style='text-decoration:none'>event</span></a>)<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00041"></a>00041 {<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><o:p>&nbsp;</o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00042"></a>00042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://docs.freeswitch.org/classEventConsumer.html" target="_blank"><span style='text-decoration:none'>EventConsumer</span></a> *E = (<a href="http://docs.freeswitch.org/classEventConsumer.html" target="_blank"><span style='text-decoration:none'>EventConsumer</span></a> *) <a href="http://docs.freeswitch.org/structdb__job.html#4802fd1cb648aae4f501dacd55325a45" target="_blank"><span style='text-decoration:none'>event</span></a>-&gt;bind_user_data;<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00043"></a>00043&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://docs.freeswitch.org/structswitch__event.html" target="_blank"><span style='text-decoration:none'>switch_event_t</span></a> *dup;<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00044"></a>00044&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><o:p>&nbsp;</o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00045"></a>00045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://docs.freeswitch.org/group__events.html#g84d51747affe16447c198259393f7f5f" target="_blank"><span style='text-decoration:none'>switch_event_dup</span></a>(&amp;dup, <a href="http://docs.freeswitch.org/structdb__job.html#4802fd1cb648aae4f501dacd55325a45" target="_blank"><span style='text-decoration:none'>event</span></a>);<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00046"></a>00046 <o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><o:p>&nbsp;</o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00047"></a>00047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (<a href="http://docs.freeswitch.org/group__switch__FIFO.html#g741daa24824e798082049129dda769cc" target="_blank"><span style='text-decoration:none'>switch_queue_trypush</span></a>(E-&gt;<a href="http://docs.freeswitch.org/classEventConsumer.html#2f2dfe6b5ce6d0e0eac6cbdc035dcbd4" target="_blank"><span style='text-decoration:none'>events</span></a>, dup) != <a href="http://docs.freeswitch.org/switch__types_8h.html#fedb3923fc3ae51937cef145c5499dc1c65533002f858f1db8ea9a4aa9fd9784" target="_blank"><span style='text-decoration:none'>SWITCH_STATUS_SUCCESS</span></a>) {<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00048"></a>00048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://docs.freeswitch.org/group__log.html#g5a8b2daf3d882cd8c92e7995ef7628ff" target="_blank"><span style='text-decoration:none'>switch_log_printf</span></a>(<a href="http://docs.freeswitch.org/switch__types_8h.html#e66733232089cf717202d43a4a8d4db2" target="_blank"><span style='text-decoration:none'>SWITCH_CHANNEL_LOG</span></a>, <a href="http://docs.freeswitch.org/switch__types_8h.html#b74279dba7ee171b8b9d3decfcf1358417a4142baa45448bf4f74eb773d24870" target="_blank"><span style='text-decoration:none'>SWITCH_LOG_ERROR</span></a>, &quot;Cannot queue any more events.....\n&quot;);<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00049"></a>00049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://docs.freeswitch.org/group__events.html#gd16cb49fa95c53cad45731669de40038" target="_blank"><span style='text-decoration:none'>switch_event_destroy</span></a>(&amp;dup);<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00050"></a>00050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><o:p>&nbsp;</o:p></pre><pre style='margin-bottom:3.0pt;background:whitesmoke'><a name="14258cb49f6925a0_l00051"></a>00051 <o:p></o:p></pre></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><a name="14258cb49f6925a0_l00052"></a>00052 }<o:p></o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p></blockquote></div></div></body></html>