<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=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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
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;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">This looks like package memory. Can you dump the fragments and send the output?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New",serif;mso-fareast-language:EN-US">kamcmd pkg.stats<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">This will show you memory usage, for each Kamailio process.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif">kamcmd cfg.set_now_int core mem_dump_pkg PID<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New",serif">kamcmd cfg.set_now_int core mem_dump_pkg 1<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">This will dump the memory fragments to syslog. You’ll need to replace PID with the process ID of one of your affected Kamailio processes, as taken
 from the pkg.stats output.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> sr-users [mailto:sr-users-bounces@lists.sip-router.org]
<b>On Behalf Of </b>beer Ll<br>
<b>Sent:</b> 26 September 2016 11:56<br>
<b>To:</b> sr-users@lists.sip-router.org<br>
<b>Subject:</b> [SR-Users] memory problem<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">hi all<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I have kamailio 4.2.0 on Debian Jessie
<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">the parameters on startup of kamailio are :<br>
<br>
SHM_MEMORY=512<br>
PKG_MEMORY=32<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">the server is dedicated to the kamailio SIP service with authentication and accounting  on a separated db server<br>
<br>
the server process about 30/50  call setups per second<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
everythings works good but after 5/6 days the processes lock and I received a lot of error log like these:
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><core> [rvalue.c:1710]: rval_str_add2(): rv eval out of memory<br>
<core> [msg_translator.c:362]: received_builder(): out of memory<br>
<core> [msg_translator.c:2717]: via_builder(): out of memory<br>
...<br>
<core> [msg_translator.c:2423]: build_res_buf_from_sip_req(): out of memory; needs 514<br>
...<br>
 <core> [data_lump.c:172]: insert_new_lump_before(): out of memory<br>
acc [acc_extra.c:267]: extra2strar(): extra2strar: out of memory.<br>
<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">after a kamailio reboot evrethings works again for 5/6 days.<br>
<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">what can I do to resolve?<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>