<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<p>Hi.</p>
<p><br>
</p>
<p>After a stress test with my OpenSIPS and few user agent clients on-line, just sending SIP REGISTER messages (1 at each minute), not making calls, I saw this log:<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Apr 15 10:09:20 [20441] WARNING:core:fm_malloc: Not enough free memory, will attempt defragmentation<br>
Apr 15 10:09:20 [20441] ERROR:db_sqlite:db_sqlite_allocate_rows: no memory left<br>
Apr 15 10:09:20 [20441] ERROR:db_sqlite:db_sqlite_convert_rows: no private memory left<br>
Apr 15 10:09:20 [20441] ERROR:db_sqlite:db_sqlite_convert_result: error while converting rows<br>
Apr 15 10:09:20 [20441] ERROR:db_sqlite:db_sqlite_store_result: error while converting result<br>
Apr 15 10:09:20 [20441] ERROR:avpops:db_query_avp: raw_query failed: db0(usr_preferences) select Value from GeneralConfigurations ...</p>
<p><br>
</p>
<p>So, I suspect that I have codified something wrong in my opensips.cfg file.</p>
<p>More precisely, I have used some AVPs and I'm note sure if such use is correct or if it is the cause of increasingly memory consumption.</p>
<p>For example, I have codified somethings like this:</p>
<p><br>
</p>
<p><br>
</p>
<p>1 if($avp(I_A) == NULL){<br>
avp_db_query("select Value from GeneralConfigurations where Attribute = 'CONFIGURATION_INTERCOM_A_NAME'", "$avp(I_A)");<br>
}</p>
<p><br>
</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p><br>
</p>
<p>2 if ($rU==$avp(M_TU)){<br>
$rU = $avp(M_T);<br>
}</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p><br>
</p>
<p>3 if (nat_uac_test("34")) { <br>
if (is_method("REGISTER")) {<br>
fix_nated_register();<br>
setbflag(NAT);<br>
$avp(attr) = "in_another_network";<br>
} else {<br>
fix_nated_contact();<br>
setflag(NAT);<br>
}<br>
}</p>
<p><br>
</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>4 $avp(ContatoRegister) = $(ct.fields(uri){s.select,0,;});<br>
if($fn != NULL){<br>
avp_db_query("UPDATE location SET callerName='$fn' where contact like '$avp(ContatoRegister)%'");<br>
}<br>
$avp(ContatoRegister) = NULL;<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Could some of the 4 piece of codes above causes some increasingly memory consumption?</p>
<p><br>
</p>
<p>Any hint will be very helpful!</p>
<p><br>
</p>
<p>Best regards.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
</div>
</body>
</html>