rlm_python3 behavior with multi-worker threads
Erdal Emlik
erdalemlik at icloud.com
Thu Sep 25 15:25:33 UTC 2025
you are always so helpful. I can’t thank you enough. Very appreciated!!
Sent from my iPhone
> On 25 Sep 2025, at 17:59, Alan DeKok <alan.dekok at inkbridge.io> wrote:
>
> On Sep 24, 2025, at 3:35 PM, Erdal Emlik <erdalemlik at icloud.com> wrote:
>> Thank you for detailed and quick response.
>> This is my default configuration, and this is my Python module.
>
> I can't debug third-party Python code, that's not relevant to FreeRADIUS. But...
>
>> I also use Python for accounting, since I send records to Kafka from within it, but I have never received any exceptions there.
>
> It's not about exceptions. It's about it being slow.
>
>> Getting exceptions only in authentication is a bit confusing for me.
>
> The server uses the same threads for both authentication and accounting. So if all of the threads are blocked in accounting, the authentication packets will have probl
>
>> (I’m planning to switch to the Kafka module and I’m following the updates on that…)
>
> It's preferable to use the native functionality. The Python module is very slow. Very, very, very, slow.
>
>> if find_key(p, "NAS-Port-Id"):
>> return find_key(p, "NAS-Port-Id").split('#')[0]
>> return find_key(p, "Calling-Station-Id").split('#')[0]
>
> Don't do this.
>
> These checks can be done in unlang. You don't need to use Python. And it will be 1000 times faster.
>
>
> Alan DeKok.
>
More information about the Freeradius-Users
mailing list