Pipelimit needs restart to reload values
Greetings, I've been using the pipelimit module and the pl_check function to control users rates in my proxy. if (!pl_check("$var(UserID)", "TAILDROP", "$var(UserRate)")) { pl_drop(); exit; } In this case $var(UserID) is the pipe and $var(UserRate) is the maximum rate. The value of the rate is retrieved on every call via query to a DB. If I change the UserRate value to 0 CPS on the DB calls are not rejected unless they go over 1 CPS. However, if I restart Kamailio all calls are correctly rejected. Why does this happen? Can I change this behaviour? Cheers, Duarte
Hello, this sounds either like a limitation that should be documentation in the module readme, or a small bug that could be fixed. You could open an issue on our tracker about it, or even better, submit a pull request. Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com<https://gilawa.com/> From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Duarte Rocha Sent: Friday, September 23, 2022 2:31 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org> Subject: [SR-Users] Pipelimit needs restart to reload values Greetings, I've been using the pipelimit module and the pl_check function to control users rates in my proxy. if (!pl_check("$var(UserID)", "TAILDROP", "$var(UserRate)")) { pl_drop(); exit; } In this case $var(UserID) is the pipe and $var(UserRate) is the maximum rate. The value of the rate is retrieved on every call via query to a DB. If I change the UserRate value to 0 CPS on the DB calls are not rejected unless they go over 1 CPS. However, if I restart Kamailio all calls are correctly rejected. Why does this happen? Can I change this behaviour? Cheers, Duarte
Hi, I faced the same behavior with pipelimit and solved it for me with cfg_rpc variable that I raised or lowered to my needs. https://www.kamailio.org/docs/modules/devel/modules/cfg_rpc.html Duarte Rocha <duarterocha91@gmail.com> schrieb am Fr., 23. Sept. 2022, 14:32:
Greetings,
I've been using the pipelimit module and the pl_check function to control users rates in my proxy.
if (!pl_check("$var(UserID)", "TAILDROP", "$var(UserRate)")) { pl_drop(); exit; }
In this case $var(UserID) is the pipe and $var(UserRate) is the maximum rate. The value of the rate is retrieved on every call via query to a DB.
If I change the UserRate value to 0 CPS on the DB calls are not rejected unless they go over 1 CPS. However, if I restart Kamailio all calls are correctly rejected.
Why does this happen? Can I change this behaviour?
Cheers,
Duarte
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello, Looks like a small issue with the module. An issue could be opened about it, or even better, a pull request with some improvement. Cheers, Henning From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Karsten Horsmann Sent: Monday, October 24, 2022 4:56 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org> Subject: Re: [SR-Users] Pipelimit needs restart to reload values Hi, I faced the same behavior with pipelimit and solved it for me with cfg_rpc variable that I raised or lowered to my needs. https://www.kamailio.org/docs/modules/devel/modules/cfg_rpc.html Duarte Rocha <duarterocha91@gmail.com<mailto:duarterocha91@gmail.com>> schrieb am Fr., 23. Sept. 2022, 14:32: Greetings, I've been using the pipelimit module and the pl_check function to control users rates in my proxy. if (!pl_check("$var(UserID)", "TAILDROP", "$var(UserRate)")) { pl_drop(); exit; } In this case $var(UserID) is the pipe and $var(UserRate) is the maximum rate. The value of the rate is retrieved on every call via query to a DB. If I change the UserRate value to 0 CPS on the DB calls are not rejected unless they go over 1 CPS. However, if I restart Kamailio all calls are correctly rejected. Why does this happen? Can I change this behaviour? Cheers, Duarte __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org> Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
participants (3)
-
Duarte Rocha -
Henning Westerholt -
Karsten Horsmann