As reported by Juan Priotti [here](https://lists.kamailio.org/pipermail/sr-users/2017-December/099727.html) the way pipelimit actually works is:
limit * timer_interval = max req/sec
However the [module documentation](https://www.kamailio.org/docs/modules/5.1.x/modules/pipelimit.html#pipelimit...) can be interpreted as:
limit / timer_interval = max req/sec
Is this just a documentation error or are we doing something wrong? Thanks.
Hello, there have been two changes in January 2018 to this module (1880f1f8be4b51ce and 407b257d4ef56730e04). Here the internal logic of the module was changed, it works now different. Have a look to the git master or 5.0/5.1 branch to get the idea. If you still see an error in the documentation, please re-open this issue.
Closed #1671.
We're using version: kamailio 5.0.7 (x86_64/linux) 743c2d and pl_check() using TAILDROP algorithm is only triggered when the pipe counter is greater than "interval" * "timer_interval".
Example: ``` modparam("pipelimit", "timer_interval", 3) modparam("pipelimit", "hash_size", 10) modparam("pipelimit", "db_url", DBURL) modparam("pipelimit", "reply_code", 503) modparam("pipelimit", "reply_reason", "CPS Limit reached")
if (!pl_check("$si", "TAILDROP", "20")) { pl_drop(); exit; } ```
Result: pl_check is only triggered when "PIPE: id=10.0.0.2 load=0 counter=61"
@henningw can you please re-open this issue?
Reopened #1671.
@rogelio-telnyx - can you try with the patch from commit fb408fb and see if it fixes this issue? Patch was intended more for #1675, but might be what is needed for this one as well. If not, I will look more into this one.
@miconda I will try with the patch from commit fb408fb and confirm results. In the meantime can you confirm if it'd be feasible for Kamailio to work with pipelimit's timer_interval set to 1 second or if that can cause performance issues? Thanks
It is how most of the deployments are out there, so should work fine. Only if you have a deployment with heavy/lengthly timer tasks, you have to start offloading the main timer. This can be done also in other modules, like usrloc, htable, ... by setting their mod params to use own timers -- usually this is controlled via timer_procs or timer_mode mod params of each module, but to be sure check if there are other timer related params in the readme of each module.
Thanks @miconda, I'll post my findings here.
@rogelio-telnyx - did you managed to test the referenced patch already?
Closing, a patch was pushed long time ago. If another issue happens, open a new one.
Closed #1671.