<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Kamen,<br>
<br>
Your memory issue seams related to private memory (pkg mem) and not
to shared mem (as if the transactions were a problem).<br>
<br>
First try to increase the amount of private memory -> in
config.h, the PKG_MEM_POOL_SIZE define. (you need to recompile).<br>
<br>
If you still have the problem, let me know.<br>
<br>
Regards,<br>
Bogdan<br>
<br>
On 07/06/2011 03:57 PM, Kamen Petrov wrote:
<blockquote
cite="mid:CAOrN=OVTCJGo5WiihHmnWrOTohtpZXCtHVWip-CJ3d=5Ei0DcA@mail.gmail.com"
type="cite">Hi Anca,<br>
<br>
I had the same issue last night.<br>
<br>
My script is as follow:<br>
<i style="color: rgb(51, 51, 51);"><br>
if
(subst_uri('/^<a class="moz-txt-link-freetext" href="sip:(">sip:(</a>[0-9]+)@(.*)$/$json(cs/fwd_domainport)/i')){<br>
if ($var(debug_level) > 3) { xlog("[leg2]LOG: We got:
BillingID=$avp(s:billing_id) , Provider
RateID=$avp(s:prov_raterec_id) , SrcipID=$avp(s:srcip_id) ,
Termination GW ID=$avp(s:prov_termgw_id)\n"); }<br>
}<br>
<br>
b2b_init_request("top hiding");<br>
xlog("Saving to $avp(i:99): $json(cs)\n");</i><br>
<br>
<br>
and my log says:<br>
<i style="color: rgb(51, 51, 51);">Jul 6 01:00:03 db01
opensips-leg2: [leg2]LOG: We got: BillingID=<null> ,
Provider RateID=<null> , SrcipID=<null> ,
Termination GW ID=<null><br>
<b>Jul 6 01:00:03 db01 opensips-leg2: WARNING:core:fm_malloc:
Not enough free memory, will atempt defragmenation<br>
Jul 6 01:00:03 db01 opensips-leg2: ERROR:core:parse_headers:
pkg memory allocation failed<br>
Jul 6 01:00:03 db01 opensips-leg2:
ERROR:b2b_logic:init_request: failed to parse message</b><br>
Jul 6 01:00:03 db01 opensips-leg2: Saving to <null>: {
"orig_callid": "<a moz-do-not-send="true"
href="mailto:2524605-3518920775-311907@domain.net">2524605-3518920775-311907@domain.net</a>",
"fwd_domainport": <a class="moz-txt-link-rfc2396E" href="sip:16414656000@nnn.nnn.nnn.nnn:5060">"sip:16414656000@nnn.nnn.nnn.nnn:5060"</a>,
"billing_id": 1, "prov_raterec_id": 2, "srcip_id": 1,
"prov_termgw_id": 11, "ani": "111111111111", "display_name":
"111111111111" }</i><br clear="all">
<br>
<br>
I had those errors for every single call attempt. It seems this
happens on:<br>
<i style="color: rgb(51, 51, 51);"><b>b2b_init_request("top
hiding");</b><br>
<br>
</i>I had to restart the B2B to get rid of the issue. <br>
After the restart, here is how the same log looks like:<br>
<i style="color: rgb(51, 51, 51);">Jul 6 07:51:27 db01
opensips-leg2: [leg2]LOG: We got: BillingID=<null> ,
Provider RateID=<null> , SrcipID=<null> ,
Termination GW ID=<null><br>
Jul 6 07:51:27 db01 opensips-leg2:
[leg2][xxx.xxx.xxx.xxx]=========LOCAL_ROUTE (INVITE -
<null>) - CallID=B2B.131.4459132 , Term=nnn.nnn.nnn.nnn
=========<br>
Jul 6 07:51:27 db01 opensips-leg2: Saving to 131.0: {
"orig_callid": "<a moz-do-not-send="true"
href="mailto:2529570-3518945466-704362@domain.net">2529570-3518945466-704362@domain.net</a>",
"fwd_domainport": <a class="moz-txt-link-rfc2396E" href="sip:16414656050@nnn.nnn.nnn.nnn:5060">"sip:16414656050@nnn.nnn.nnn.nnn:5060"</a>,
"billing_id": 1, "prov_raterec_id": 2, "srcip_id": 1,
"prov_termgw_id": 11, "ani": "111111111111", "display_name":
"111111111111" }</i><br>
<br>
<br>
Here is my local route:<br>
<i style="color: rgb(51, 51, 51);">local_route {<br>
$var(debug_level) = 10;<br>
if (is_present_hf("LEG1CID")) xlog("LEG1CID AFTER TOP
HIDING\n");<br>
if ($var(debug_level) > 2) {
xlog("[leg2][$si]=========LOCAL_ROUTE ($rm - $rr) - CallID=$ci ,
Term=$rd =========\n"); }<br>
if (is_method("ACK") &&
$ci=~"B2B\.[0-9]+\.[0-9]+") {<br>
route(19);<br>
}<br>
else if (is_method("BYE") &&
$ci=~"B2B\.[0-9]+\.[0-9]+" && src_ip=="</i><i
style="color: rgb(51, 51, 51);">xxx.xxx.xxx.xxx</i><i
style="color: rgb(51, 51, 51);">") {<br>
route(91);<br>
}<br>
}</i><br>
<br>
<br>
Any idea?<i style="color: rgb(102, 102, 102);"><br>
<br>
<br>
Thanks<br>
-- Kamen</i><br>
<br>
<br>
<div class="gmail_quote">On 4 May 2011 11:45, Anca Vamanu <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:anca@opensips.org">anca@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff"> Hi Jeff,<br>
<br>
Is this with B2BUA?<br>
I have a report with a complex b2b scenario and transactions
hanged in memory.<br>
<br>
Regards,<br>
Anca<br>
<br>
<br>
On 29/04/11 16:28, Jeff Pyle wrote:
<blockquote type="cite">
<div>
<div>Hello,</div>
<div><br>
</div>
<div>Everything is running along just fine for weeks on
1.6.4, and then <i>bam</i>, this shows up in the logs:</div>
<div><br>
</div>
<div>
<blockquote style="margin: 0px 0px 0px 40px;
border-style: none; padding: 0px;">
<div>/usr/sbin/opensips[12290]:
WARNING:core:fm_malloc: Not enough free memory,
will atempt defragmenation</div>
<div>/usr/sbin/opensips[12290]:
ERROR:tm:insert_tmcb: no more shared memory</div>
<div>/usr/sbin/opensips[12290]:
ERROR:uac:replace_uri: failed to install TM
callback</div>
<div>/usr/sbin/opensips[12284]:
WARNING:core:fm_malloc: Not enough free memory,
will atempt defragmenation</div>
<div>/usr/sbin/opensips[12284]: ERROR:core:new_avp:
no more shm mem</div>
<div>/usr/sbin/opensips[12284]: ERROR:core:add_avp:
Failed to create new avp structure</div>
<div>/usr/sbin/opensips[12306]:
WARNING:core:fm_malloc: Not enough free memory,
will atempt defragmenation</div>
<div>/usr/sbin/opensips[12306]: ERROR:tm:new_t: out
of mem</div>
<div>/usr/sbin/opensips[12302]:
WARNING:core:fm_malloc: Not enough free memory,
will atempt defragmenation</div>
<div>/usr/sbin/opensips[12302]:
ERROR:tm:relay_reply: no more share memory</div>
<div>/usr/sbin/opensips[12284]:
WARNING:core:fm_malloc: Not enough free memory,
will atempt defragmenation</div>
<div>/usr/sbin/opensips[12294]:
WARNING:core:fm_malloc: Not enough free memory,
will atempt defragmenation</div>
<div>/usr/sbin/opensips[12284]: ERROR:core:new_avp:
no more shm mem</div>
<div>/usr/sbin/opensips[12284]: ERROR:core:add_avp:
Failed to create new avp structure</div>
<div>/usr/sbin/opensips[12306]: ERROR:tm:t_newtran:
new_t failed</div>
<div>/usr/sbin/opensips[12294]:
ERROR:tm:relay_reply: no more share memory</div>
</blockquote>
</div>
<div><br>
</div>
<div>Hundreds of lines like it. This is just a sample.
But, it did not crash. I have shared memory set to
32M. Normally I run less than 8M used. After this
event the max_used_size was at 32M, but the
real_used_size was around 24M. And it wasn't
changing. Strange.</div>
<div><br>
</div>
<div>My first thought was a DoS attack but a pcap I took
right after looked normal.</div>
<div><br>
</div>
<div>Normally this proxy runs anywhere from 70-150
transactions in progress at any given moment. After
this event, it was stuck at right around 1300. Things
seemed to be processing; no symptoms on outbound
calls. Very strange.</div>
<div><br>
</div>
<div>I restarted Opensips and everything seems normal.</div>
<div><br>
</div>
<div>I'm not sure where to begin on this one. I'm not
sure if the shared memory problem was a symptom or a
cause. In the few years I've been working with
Opensips I've never seen anything like this. Any
direction from the list would be great.</div>
<div><br>
</div>
<div><br>
</div>
<div>- Jeff</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Anca Vamanu
OpenSIPS Developer</pre>
</div>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a moz-do-not-send="true"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"</pre>
</body>
</html>