<div dir="ltr"><div><div><div>Hi,<br>I'm making some tests with pipelimit module and when changing the time interval the limit gets changed in a way that it's multiplied by the time interval. For example if I use a time interval of 1 second and a limit of 20 (if (!pl_check("$si", "TAILDROP", "20"))) the module start limiting right after the traffic gets over 20 CPS. But if I change the time interval to 3 seconds, the module starts limiting the traffic right after 60 CPS. This is my configuration:<br><br># ----- pipelimit params-----<br>modparam("pipelimit", "timer_interval", 3)<br>modparam("pipelimit", "hash_size", 10)<br>modparam("pipelimit", "db_url", DBURL)<br>modparam("pipelimit", "reply_code", 503)<br>modparam("pipelimit", "reply_reason", "Limiting")<br><br>...<br>...<br>...<br><br>request_route {</div><div>...</div><div>...</div><div>        if(is_method("INVITE")) {<br>                $var(limit) = 20;<br>                if (!pl_check("$si", "TAILDROP", "$var(limit)")) {<br>                xlog("L_INFO", "[$ci] $si - Limiting INVITE using pipe $var(limit) req/sec\n");<br>                pl_drop();<br>                exit;<br>                }<br>.....<br>.....<br>.....<br>        }<br>}<br><br><br>Checking the source for pipelimit module (<a href="https://github.com/kamailio/kamailio/blob/master/src/modules/pipelimit/pipelimit.c">https://github.com/kamailio/kamailio/blob/master/src/modules/pipelimit/pipelimit.c</a>) I see that for taildrop it's checking for the limit times the time_interval:<br><br>case PIPE_ALGO_TAILDROP:<br>ret = (pipe->counter <= pipe->limit * timer_interval) ? 1 : -1;<br>break;<br><br></div>I've made a change eliminating the time_interval (set it to 1) from that check and after that I've got the limit working OK, and the traffic gets drop right after it's over the limit (20 cps) using any time_interval. Is there some issue with the timer for the check not being updated by the module settings (timer_interval)? I'm using kamailio 4.4 and I've also tested it in kamailio 4.3 and 5.1 with same results.<br></div>Thanks in advance,<br><br></div>Juan Priotti<br><div><div><div><br></div></div></div></div>