Hello,
you have to allocate more private (pkg) memory via -M command line parameter.
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.
Cheers, Daniel
On 19.10.19 21:22, Sergiu Pojoga wrote:
Hi ppl,
I'm testing this external app (cgrates, you all know it) that talks to Kamailio via evapi. Every /n/ minutes the app sends an evapi request to Kamailio which returns back the list of all dialogs like so:
jsonrpc_exec('{"jsonrpc":"2.0","id":1, "method":"dlg.list","params":[]}'); evapi_relay("{"event":"CGR_DLG_LIST_REPLY", "jsonrpl_body":$jsonrpl(body)}");
The problem is that the size of /$jsonrpl(body)/ PV is limited by Kamailio's /pv_buffer_size/ setting.
My math shows that a single dialog is about 1KiB of json data.
*Problem*: Kamailio fails to start with a /pv_buffer_size /higher than 117 KiB (119808 bytes), which in turn rends the system's limit to about 117 simultaneous calls... pretty sad.
Below find the error when trying to start Kamailio with higher values:
0(17080) ERROR: <core> [core/mem/q_malloc.c:291]: qm_find_free(): qm_find_free(0x7f02275c5010, 120832); Free fragment not found! 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! 0(17080) ERROR: <core> [core/pvapi.c:2072]: pv_init_buffer(): cannot init PV print buffer slot[39]
Is there a workaround for this?
Thanks, --Sergiu
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users