On 02/01/2019 07.45, Yuriy Gorlichenko wrote:
Hi!
Happy new year to all!!!
Look like I am first in this year wit hthe questions in this list :-).
I'm using stateless kamailio and RTPengnine to build some kind of the
stateless cluster
I found that kamailio keeps some data in the SHMEM in case of using
RTPengine module even if it is not a rtpengine_manage function but
offer/answer/delete
In this case if INVITE (offer) handled by 1-st kamailio in my cluster,
and BYE/CANCEL handled by second kamailio in the cluster - 1-st
kamailio (which has been used for offer) will hase kinda internal
"memory leak" (in SHMEM it never decrased)
At the rtpengine module source I found some transation dependencies
for the rtpengine_manage function but did not find for the
offer/answer/delete
I supposed these 3 functions just sending requests to the rtpnegine
with keys and not storing anything
So my question - is it possible to use RTPengine module in stateless
way to avoid internal "memory leak" because in my scenario I have big
chance never receive BYE/CANCEL on the machine that started handle
particular call
This is probably the module-internal hash table that is used to make
sure that signalling relating to the same call is always sent to the
same rtpengine instance. This hash table does have a configurable
timeout value (`hash_table_tout`, defaults to 1 hour), which makes it
possible to still use it in a way you've described. However, from the
code it's my understanding that timed out hash table entries are only
deleted when they're encountered during processing, so it's not entirely
deterministic that old entries are always deleted after they've timed
out. The RPC command `rtpengine.get_hash_total` can be used to inspect
the current size of the hash table.
Cheers