Discussion:
[SR-Users] pipelimit in 4.2.0 and beyond
Alex Balashov
2014-10-19 04:38:35 UTC
Permalink
Hi,

I was testing the new dynamic pipelimit instantiation functionality
heralded in 4.2, and, strangely enough, it doesn't seem to work at all.

Every time I call pl_check(), it just blocks the worker thread
indefinitely, until I--rather quickly--run out of available workers.

I've tried it with db_url (which I gathered to not be mandatory),
without a db_url, using every algorithm possible, with a static pipe
name, with a PV pipe name, etc. It all yields the same results. Here is
my current employment of it:

if($(xavp(call=>ingress_cps_limit){s.int}) > 0) {
xlog("L_INFO", "DEBUG: PRE PL CHECK $ci\n");

if(!pl_check("1", "RED", "2")) {

xlog("L_INFO", "DEBUG: AFTER PL CHECK $ci\n");

pl_drop();

xlog("L_INFO", "Ingress call setup rate limit
for this BG "

"$(xavp(call=>ingress_cps_limit){s.int}) has "
"been exceeded; rejecting call\n");

exit;
}

xlog("L_INFO", "DEBUG: AFTER PL CHECK $ci\n");
}

modparam("pipelimit", "hash_size", 12)
modparam("pipelimit", "timer_interval", 5)
modparam("pipelimit", "reply_code", 503)
modparam("pipelimit", "reply_reason", "Call Setup Rate Exceeded")

I never reach "AFTER PL CHECK".

Here's what I actually want to do:

if($(xavp(call=>ingress_cps_limit){s.int}) > 0) {
if(!pl_check("$avp(trunk_id)", "RED",
"$(xavp(call=>ingress_cps_limit){s.int})")) {
pl_drop();

xlog("L_INFO", "!> "
"Ingress call setup rate limit for this BG "
"$(xavp(call=>ingress_cps_limit){s.int}) has "
"been exceeded; rejecting call\n");

exit;
}
}

I tried upping debug to debug=3 but get nothing insightful that pertains
to pipelimit at all, as far as I can see.

This is on a stock CentOS 6.5 install,
sip-router:master:36e695453762b5ed15e5048fad2c559bb239dad5 compiled from
source.

Thanks!
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906
Daniel-Constantin Mierla
2014-10-19 05:14:48 UTC
Permalink
Hello,

use the latest branch 4.2 -- it was a first fix there and that is for
pipelimit.

Cheers,
Daniel
Post by Alex Balashov
Hi,
I was testing the new dynamic pipelimit instantiation functionality
heralded in 4.2, and, strangely enough, it doesn't seem to work at all.
Every time I call pl_check(), it just blocks the worker thread
indefinitely, until I--rather quickly--run out of available workers.
I've tried it with db_url (which I gathered to not be mandatory),
without a db_url, using every algorithm possible, with a static pipe
name, with a PV pipe name, etc. It all yields the same results. Here
if($(xavp(call=>ingress_cps_limit){s.int}) > 0) {
xlog("L_INFO", "DEBUG: PRE PL CHECK $ci\n");
if(!pl_check("1", "RED", "2")) {
xlog("L_INFO", "DEBUG: AFTER PL CHECK $ci\n");
pl_drop();
xlog("L_INFO", "Ingress call setup rate limit
for this BG "
"$(xavp(call=>ingress_cps_limit){s.int}) has "
"been exceeded; rejecting call\n");
exit;
}
xlog("L_INFO", "DEBUG: AFTER PL CHECK $ci\n");
}
modparam("pipelimit", "hash_size", 12)
modparam("pipelimit", "timer_interval", 5)
modparam("pipelimit", "reply_code", 503)
modparam("pipelimit", "reply_reason", "Call Setup Rate Exceeded")
I never reach "AFTER PL CHECK".
if($(xavp(call=>ingress_cps_limit){s.int}) > 0) {
if(!pl_check("$avp(trunk_id)", "RED",
"$(xavp(call=>ingress_cps_limit){s.int})")) {
pl_drop();
xlog("L_INFO", "!> "
"Ingress call setup rate limit for this BG "
"$(xavp(call=>ingress_cps_limit){s.int}) has "
"been exceeded; rejecting call\n");
exit;
}
}
I tried upping debug to debug=3 but get nothing insightful that
pertains to pipelimit at all, as far as I can see.
This is on a stock CentOS 6.5 install,
sip-router:master:36e695453762b5ed15e5048fad2c559bb239dad5 compiled
from source.
Thanks!
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Alex Balashov
2014-10-19 06:08:40 UTC
Permalink
Post by Daniel-Constantin Mierla
use the latest branch 4.2 -- it was a first fix there and that is for
pipelimit.
Ah, an unreleased lock! I thought it might be that, it looked like a
classic deadlock.

Sorry for not noticing that patch before. I'll try it shortly and let
you know the result. Much appreciated!
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

Please be kind to the English language:

http://www.entrepreneur.com/article/232906
Loading...