[sr-dev] pipelimit in 4.2.0 and beyond

Daniel-Constantin Mierla miconda at gmail.com
Sun Oct 19 07:14:48 CEST 2014


Hello,

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

Cheers,
Daniel

On 19/10/14 06:38, Alex Balashov wrote:
> 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!
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-dev mailing list