[SR-Users] rtpengine in stateless kamailio

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 2 15:31:30 CET 2019


Hello,

to see the source of the leak in shared memory, the best is to generate
usage summary.

First set memlog lower than debug parameter, you can do in the kamailio.cfg
or via rpc:

kamcmd cfg.set_now_int core memlog 1

The above sets memlog to 1, so choose a value lower than what you have for
debug.

The generate the summary via rpc:

kamcmd corex.shm_summary

Look in syslog for printed messages related to use of shared memory.

Cheers,
Daniel


On Wed, Jan 2, 2019 at 2:45 PM Richard Fuchs <rfuchs at sipwise.com> wrote:

> 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
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190102/61c3350b/attachment.html>


More information about the sr-users mailing list