On 03.03.20 21:16, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
The rpc command tm.clean is like a last resort
option when dealing with
an unexpected situation that messed up the timer process, otherwise the
transactions should be cleaned as they are expired or terminated because
of final response sent upstream, with a delay of 5 seconds (default value).
Before
we find out why the transactions are not freed on time, I would
like to run a test every minute that checks if the shm usage is too
high and, if so, executes tm.clean. Something like this:
route [every_minute] {
$var(shm_usage) = ($stat(real_used_size) * 100) / $stat(total_size);
if ($var(shm_usage) > 90) t_clean();
}
Otherwise OK, but there is no t_clean() function. Could that be added?
The function can be added, should be easy to extract the code from the
rpc command function. However even now you can execute rpc commands from
kamailio.cfg using jsonrpcs module:
*
https://www.kamailio.org/docs/modules/stable/modules/jsonrpcs.html#jsonrpcs…
Cheers,
Daniel
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training - March 9-11, 2020, Berlin -
www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin --
www.kamailioworld.com