Re: rlm_python3 behavior with multi-worker threads

Erdal Emlik via Freeradius-Users <[email protected]> Thu, 25 Sep 2025 18:25:33 +0300
Newsgroups gmane.comp.freeradius.user
Message-ID <[email protected]>
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 <[email protected]> wrote:
> 
> On Sep 24, 2025, at 3:35 PM, Erdal Emlik <[email protected]> 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.
> 
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html