[Freeswitch-users] Pyrun limitations

Grant Bagdasarian gb at cm.nl
Wed Jun 13 09:02:28 UTC 2018


Hello,

We're currently using the NEventSocket library to control our freeswitch servers for starting python scripts (using a backgroundjob and pyrun py_module_name) which internally use the freeswitch.py library to originate a call.
However, we're running into some performance limitations where we can't seem to get more than 5 call setups per second.

To quote the documentation (https://freeswitch.org/confluence/display/FREESWITCH/mod_python):
"A single python interpreter is spawned at module startup and used for the lifetime of the freeswitch process."
"Each thread swaps in its "thread state" before executing python code and then swaps it out when finished. Also during blocking calls into freeswitch, a thread will swap out its thread state in order to not block other threads, and then swap it in after the blocking call to freeswitch has finished."

How does this relate to the number of threads freeswitch is allowed to start and run python scripts? If there are hard limitations set, can these be increased? I couldn't find hard numbers in the source files, so this may be controlled somewhere else?

Thanks.

Grant Bagdasarian

Senior Developer



cm.com<https://cm.com>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180613/e8341e56/attachment.html>


More information about the FreeSWITCH-users mailing list