Lua script itself creates/sets some variables, and sends/retrieves information during the flow for example
KSR.ndb_redis.redis_cmd("srvN", "SET coreCI-" .. varCI .. " " .. KSR.pv.getw("$ci") .. " EX 3600", "r");
KSR.ndb_redis.redis_cmd("srvN", "GET refvar-" .. cid, "r");
reft=KSR.pv.getw("$redis(r=>value)");
I made a test call and disconnected, what I am observing is that even if the call is finished the used memory is slightly increased.
before:
< real_used: 844240
< real_used: 844088
< real_used: 844088
< real_used: 844088
< real_used: 844088
< real_used: 844088
< real_used: 844088
< real_used: 844088
after:
> real_used: 846080
> real_used: 845864
> real_used: 846584
> real_used: 846304
> real_used: 846200
> real_used: 846120
> real_used: 845248
> real_used: 846168
My assumption is after finishing the call, memory used by variables and redis ops is released and should be back to original values but its not happening. In production this issue is causing some problems as I have to restart the kamailio process after every 3-4 weeks so that it starts breathing with more available memory.
Initially I thought its Kamailio version issue as in my last posts in this forum people advised me to upgrade to the latest kamailio version (original one was 5.4.0) but the same issue is happening on 5.7.0.
Can someone explain how to debug/troubleshoot this situation . I have a parallel lab environment, I do not see anything interesting in syslogs.
-- Muhammad Danish Moosa
" The core of mans' spirit comes from new experiences. "___ Christopher McCandless