<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:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Verdana",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@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 lang=FR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Hello,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>During some call peaks, FS replies with 503 Maximum Calls and produces the following log:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>/var/log/freeswitch/freeswitch.log.2016-12-12-10-20-33.1:2016-12-12 10:08:54.964919 [CRIT] switch_core_session.c:2270 Over Session Limit! 973<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>/var/log/freeswitch/freeswitch.log.2016-12-12-10-20-33.1:2016-12-12 10:08:54.964919 [CRIT] mod_sofia.c:4406 Error Creating Sessi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>I dig into the configuration to change many settings related to this error. So, our current "status" is:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>FreeSWITCH (Version 1.6.5 git 70b8c17 2015-11-20 20:57:50Z 64bit) is ready<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>1207363 session(s) since startup<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>684 session(s) - peak 983, last 5min 694 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>0 session(s) per Sec out of max 400, peak 164, last 5min 8 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>973 session(s) max<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>min idle cpu 0.00/39.77<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Current Stack Size/Max 240K/8192K<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>I don't understand how the 973 sessions max is determined? The switch.conf.xml is set as follow:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <settings><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="colorize-console" value="true"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="dialplan-timestamps" value="false"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="max-db-handles" value="50"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="db-handle-timeout" value="10"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="max-sessions" value="4000"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="sessions-per-second" value="400"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="loglevel" value="debug"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="mailer-app" value="sendmail"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="mailer-app-args" value="-t"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="dump-cores" value="yes"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="rtp-enable-zrtp" value="false"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="min-idle-cpu" value="0"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <param name="enable-clock-nanosleep" value="true"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'> </settings><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>I also made modifications to the OS himself, into limits.conf:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>freeswitch hard nofile 500000<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>freeswitch soft nofile 500000<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>freeswitch hard nproc 62815<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>freeswitch soft nproc 62815<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>The setup looks to be active:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'># cat /proc/25695/limits <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Limit Soft Limit Hard Limit Units <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max cpu time unlimited unlimited seconds <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max file size unlimited unlimited bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max data size unlimited unlimited bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max stack size 245760 8388608 bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max core file size unlimited unlimited bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max resident set unlimited unlimited bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max processes 62815 62815 processes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max open files 500000 500000 files <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max locked memory 65536 65536 bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max address space unlimited unlimited bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max file locks unlimited unlimited locks <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max pending signals 62815 62815 signals <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max msgqueue size 819200 819200 bytes <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max nice priority 0 0 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max realtime priority 0 0 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Max realtime timeout unlimited unlimited us <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Any idea? Thanks.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Igor.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Verdana",sans-serif'><o:p> </o:p></span></p></div></body></html>