On Fri, Oct 14, 2022 at 5:25 PM Daniel-Constantin Mierla <miconda@gmail.com> wrote:

OK. Can you run the tests for a while and then execute:

kamctl rpc corex.pkg_summary idx 1

The value for idx should be the kamailio process expected to handle sip traffic. If it is mostly udp and the first socket is the corresponding udp socket, then the value 1, like above, is ok. If it is tcp/tls or you have different listen parameters on udp, see the processes index with:

kamctl ps

I tried calling 
  kamctl rpc corex.pkg_summary idx 1
before and after the memory problem started to be logged but it always showed up with result empty:

{
  "jsonrpc":  "2.0",
  "result": {
  },
  "id": 3824999

Here is result for all processes:
  https://pastebin.com/AabwyJwx
I tried several times but I never saw a non-empty result.
 

It should not be required to wait till you get out of memory errors, but be sure you run it long enough to have many accounting records written by the process that is going to print the pkg summary. You can eventually set the children to 1 or 2, to "force" traffic via a smaller group of processes.


By reducing children from
  children=12
to
  children=1
I started to get memory allocation error just a after a few minutes of load test:

[root@lab002107-flip-server ~]$ grep memory /var/log/kamailio/kamailio.log |head
2022-10-17T06:20:41.314619+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool
2022-10-17T06:20:41.916596+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool
2022-10-17T06:20:41.916786+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool
2022-10-17T06:20:42.518013+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool
2022-10-17T06:20:42.518248+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool
2022-10-17T06:20:43.114454+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: <core> [core/rvalue.c:253]: rval_new_empty(): could not allocate private memory from pkg pool
2022-10-17T06:20:43.163816+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: <core> [core/rvalue.c:253]: rval_new_empty(): could not allocate private memory from pkg pool
2022-10-17T06:20:43.165863+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: <core> [core/rvalue.c:253]: rval_new_empty(): could not allocate private memory from pkg pool
2022-10-17T06:20:43.167092+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: <core> [core/rvalue.c:253]: rval_new_empty(): could not allocate private memory from pkg pool
2022-10-17T06:20:43.167247+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3576087]: ERROR: <core> [core/data_lump.c:163]: insert_new_lump_before(): could not allocate private memory from pkg pool

I collected the pkg summary after 4000 CDRs were written to DB but again, i could not see a non-empty result:
  https://pastebin.com/CpaRYLAR