<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>if it is pkg, then you have to see which process is increasing
      the use of memory, because it is private memory, specific for each
      process. The sum is an indicator, but the debugging has to be done
      for a specific process/pid.</p>
    <p>Once you indentify a process that is leaking pkg, execute the rpc
      command:</p>
    <p>  - <a
href="https://www.kamailio.org/docs/modules/devel/modules/corex.html#corex.rpc.pkg_summary">https://www.kamailio.org/docs/modules/devel/modules/corex.html#corex.rpc.pkg_summary</a></p>
    <p>When that process is doing some runtime work (e.g., handling of a
      sip message), the syslog will get a summary with used pkg chunks.
      Send those log messages here for analysis. You have to set memlog
      core parameter to a value smaller than debug.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 01.08.19 03:43, Andrew White wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1834350B-938B-4745-ACE4-051F63E45122@uconnected.com.au">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode:
        space; line-break: after-white-space;" class="">Hi all,
        <div class=""><br class="">
        </div>
        <div class="">I had a Kamailio crash the other day, and some
          debugging showed I ran out of PKG memory.</div>
        <div class=""><br class="">
        </div>
        <div class="">Since then I’ve run a simple bash script to
          compile the amount of memory used by all child processes,
          effective /usr/local/sbin/kamcmd pkg.stats | grep real_used
          summed together. I’ve graphed out the data, and there’s a
          clear growth of PKG memory going on, mostly increasing during
          our busier daytime hours.</div>
        <div class=""><br class="">
        </div>
        <div class=""><a href="https://i.imgur.com/UTzx2k1.png" class=""
            moz-do-not-send="true">https://i.imgur.com/UTzx2k1.png</a></div>
        <div class=""><br class="">
        </div>
        <div class="">Based on this, I suspect either a module loaded or
          something within my app_ruby conf is leaking memory.</div>
        <div class=""><br class="">
        </div>
        <div class="">I’ve been reading through <a
            href="https://www.kamailio.org/wiki/tutorials/troubleshooting/memory"
            class="" moz-do-not-send="true">https://www.kamailio.org/wiki/tutorials/troubleshooting/memory</a>,
          but I’m a bit nervous, as I’m not really a C/deep memory type
          of guy. I can see a GDB script I can attach to Kamailio, but
          is that going to use significant resources to run or impact
          the running process? Is there a newer/better/alternative way
          to do this, and to help me break this down?</div>
        <div class=""><br class="">
        </div>
        <div class="">Thanks!</div>
        <div class=""><br class="">
        </div>
        <div class="">Andrew</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
  </body>
</html>