<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><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;}
@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:11.0pt;
        font-family:"Calibri",sans-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:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal"><span style="color:windowtext">This particular system is a test system, so there’s not a TON of activity.  Though the system itself has maybe 8 GB of RAM.  So we’re talking a handful of calls throughout a given day.  The service appears to crash maybe once every couple of days.  I bumped the SHM_MEMORY up to 512 over the weekend and restarted to see what impact that has.  </span></p><p class="MsoNormal"><span style="color:windowtext"> </span></p><p class="MsoNormal"><span style="color:windowtext">Which specific command are you looking for the output of, I’m blanking on which to run.</span></p><p class="MsoNormal"><span style="color:windowtext"> </span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Daniel-Constantin Mierla [mailto:<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>] <br><b>Sent:</b> Monday, September 18, 2017 3:17 AM<br><b>To:</b> Joe Baran <<a href="mailto:jbaran@whitelabelcomm.com">jbaran@whitelabelcomm.com</a>>; Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>><br><b>Subject:</b> Re: [SR-Users] Memory configuration</span></p></div></div><p class="MsoNormal"> </p><p>If you have a lot of traffic and registered devices, you can run out of it quickly. What is the number of registered devices and call setups per second/active calls at peak?</p><p>When you do a restart, can you grab the stats and see what are the values for shared memory?</p><p>Cheers,<br>Daniel</p><p class="MsoNormal"> </p><div><p class="MsoNormal">On 17.09.17 21:12, Joe Baran wrote:</p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><p class="MsoNormal"><span style="color:windowtext"># Amount of shared memory to allocate for the running Kamailio server (in Mb)</span></p><p class="MsoNormal"><span style="color:windowtext">SHM_MEMORY=64</span></p><p class="MsoNormal"><span style="color:windowtext"> </span></p><p class="MsoNormal"><span style="color:windowtext"># Amount of private memory to allocate for the running Kamailio server (in Mb)</span></p><p class="MsoNormal"><span style="color:windowtext">PKG_MEMORY=8</span></p><p class="MsoNormal"><span style="color:windowtext"> </span></p><p class="MsoNormal"><span style="color:windowtext"> </span></p><p class="MsoNormal"><span style="color:windowtext"> </span></p><p class="MsoNormal"><span style="color:windowtext">version: kamailio 5.0.2 (x86_64/linux) </span></p><p class="MsoNormal"><span style="color:windowtext">flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES</span></p><p class="MsoNormal"><span style="color:windowtext">ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB</span></p><p class="MsoNormal"><span style="color:windowtext">poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.</span></p><p class="MsoNormal"><span style="color:windowtext">id: unknown </span></p><p class="MsoNormal"><span style="color:windowtext">compiled on 11:34:41 Jun 28 2017 with gcc 4.8.5</span></p><p class="MsoNormal"><span style="color:windowtext"> </span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> Daniel-Constantin Mierla [mailto:<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>] <br><b>Sent:</b> Friday, September 15, 2017 10:53 AM<br><b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>>; Joe Baran <<a href="mailto:jbaran@whitelabelcomm.com">jbaran@whitelabelcomm.com</a>><br><b>Subject:</b> Re: [SR-Users] Memory configuration</span></p></div></div><p class="MsoNormal"> </p><p>What is the value of shared memory you set for kamailio (-m parameter)? Maybe it is not sufficient for what you need to do.</p><p>Then what version of kamailio do you run (kamailio -v)?</p><p>The process that crashed (29438) has a different pid than the one (29468) printing the memory errors, so may or may not be related.</p><p class="MsoNormal"> </p><div><p class="MsoNormal">On 14.09.17 20:36, Joe Baran wrote:</p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><p class="MsoNormal">I feel fairly confident I’m running into a memory tuning issue, but I’m struggling to determine the next step.  Can someone give me some guidance on how to adjust settings to allow the system to stop crashing kamailio?</p><p class="MsoNormal"> </p><p class="MsoNormal">Sep 14 18:25:15 server1 kamailio[29468]: ERROR: <core> [core/mem/q_malloc.c:292]: qm_find_free(): qm_find_free(0x7fa9eeeea000, 144); Free fragment not found!</p><p class="MsoNormal">Sep 14 18:25:15 server1 kamailio[29468]: ERROR: <core> [core/mem/q_malloc.c:425]: qm_malloc(): qm_malloc(0x7fa9eeeea000, 144) called from kazoo: kz_amqp.c: kz_amqp_async_query(1357), module: kazoo; Free fragment not found!</p><p class="MsoNormal">Sep 14 18:25:15 server1 kamailio[29468]: ERROR: kazoo [kz_amqp.c:1359]: kz_amqp_async_query(): failed to allocate kz_amqp_cmd in process 29468</p><p class="MsoNormal">Sep 14 18:25:15 server1 kamailio[29468]: INFO: <script>: kGddp3V0bA6nitnk25dB4w..|log|failed to send Kazoo query for authentication xxxxxxxxxxxxxxxxxx</p><p class="MsoNormal">Sep 14 18:25:15 server1 kamailio[29468]: ERROR: tm [t_reply.c:494]: _reply_light(): cannot allocate shmem buffer</p><p class="MsoNormal">Sep 14 18:25:15 server1 kamailio[29468]: ERROR: sl [sl.c:271]: send_reply(): failed to reply stateful (tm)</p><p class="MsoNormal">Sep 14 18:25:16 server1 kamailio[29483]: CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 108</p><p class="MsoNormal">Sep 14 18:25:16 server1 kamailio[29360]: ALERT: <core> [main.c:743]: handle_sigs(): child process 29438 exited by a signal 11</p><p class="MsoNormal">Sep 14 18:25:16 server1 kamailio[29360]: ALERT: <core> [main.c:746]: handle_sigs(): core was not generated</p><p class="MsoNormal"> </p><p class="MsoNormal">Thanks,</p><p class="MsoNormal"> </p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#f7751f;background:white">Joe Baran</span></p><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br></p><pre>_______________________________________________</pre><pre>Kamailio (SER) - Users Mailing List</pre><pre><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></pre><pre><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></pre></blockquote><p class="MsoNormal" style="margin-bottom:12.0pt"> </p><pre>-- </pre><pre>Daniel-Constantin Mierla</pre><pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre><pre>Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a></pre><pre>Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre></blockquote><p class="MsoNormal"><br><br></p><pre>-- </pre><pre>Daniel-Constantin Mierla</pre><pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre><pre>Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a></pre><pre>Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre></div></body></html>