<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>you have to allocate more private (pkg) memory via -M command
line parameter.</p>
<p>Maybe in the future there should be a change in evapi module not
to use the pv static buffer for its parameter, as I can see it has
use cases with large values.<br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 19.10.19 21:22, Sergiu Pojoga wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJZsGCnZ1oFknRsTrMunNm3B6v+XzP8_raUZyxDt4ZE_sAu5WQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi ppl,<br>
<div><br>
</div>
<div>I'm testing this external app (cgrates, you all know it)
that talks to Kamailio via evapi. </div>
<div>Every <i>n</i> minutes the app sends an evapi request to
Kamailio which returns back the list of all dialogs like so:</div>
<div><br>
</div>
jsonrpc_exec('{"jsonrpc":"2.0","id":1,
"method":"dlg.list","params":[]}');<br>
evapi_relay("{\"event\":\"CGR_DLG_LIST_REPLY\",<br>
<div>\"jsonrpl_body\":$jsonrpl(body)}");</div>
<div><br>
</div>
<div>The problem is that the size of <i>$jsonrpl(body)</i> PV
is limited by Kamailio's <i>pv_buffer_size</i> setting.</div>
<div><br>
</div>
<div>My math shows that a single dialog is about 1KiB of json
data.</div>
<div><br>
</div>
<div><b>Problem</b>: Kamailio fails to start with a <i>pv_buffer_size
</i>higher than 117 KiB (119808 bytes), which in turn rends
the system's limit to about 117 simultaneous calls... pretty
sad.<br>
</div>
<div><br>
</div>
<div>Below find the error when trying to start Kamailio with
higher values:</div>
<div><br>
</div>
<div> 0(17080) ERROR: <core> [core/mem/q_malloc.c:291]:
qm_find_free(): qm_find_free(0x7f02275c5010, 120832); Free
fragment not found!<br>
0(17080) ERROR: <core> [core/mem/q_malloc.c:425]:
qm_malloc(): qm_malloc(0x7f02275c5010, 120832) called from
core: core/pvapi.c: pv_init_buffer(2069), module: core; Free
fragment not found!<br>
0(17080) ERROR: <core> [core/pvapi.c:2072]:
pv_init_buffer(): cannot init PV print buffer slot[39]<br>
</div>
<div><br>
</div>
<div>Is there a workaround for this?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>--Sergiu</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>
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a class="moz-txt-link-freetext" href="https://asipto.com/u/kat">https://asipto.com/u/kat</a></pre>
</body>
</html>