Python Module Threading Issue

Alan DeKok aland at
Sat Sep 7 17:20:48 CEST 2019

On Sep 5, 2019, at 5:07 PM, Kwak Wookjong <wookjong.kwak at> wrote:
> I recently upgraded FreeRadius server 3.0.16 to 3.0.19 and observed a performance issue on handling multiple thread.
> I have done some research on this forum and found below discussion for Python Module Threading Issue about a year ago.

  Which points to this:

> and it looked like the change was made in case for using multiple python modules but the thing is,
> in my case, within a single python module the multiple requests were treated as a single threaded.

  The change was made because the Python interpreter isn't thread-safe.  Even for one module.

> Also confirmed, by putting back RLM_TYPE_THREAD_SAFE, multiple requests were handled by multi-threaded and the performance issue was resolved.

  And it will randomly crash due to threading issues.

> If it were needed to update RLM_TYPE_THREAD_UNSAFE for using multiple python module,
> Can you, at least, make it configurable so that it can be set depending on the usage and situation?

  We don't like the server crashing, sorry.

  If it seems to work for you, you can always make local changes on your system to build it with the THREAD_SAFE flag.

  Alan DeKok.

More information about the Freeradius-Users mailing list