If you are comfortable with python 3, I highly suggest using asyncio, concurrent.futures with ThreadPoolExecutor, and coroutines to listen and process events.

On Mon, Oct 7, 2019 at 7:59 AM Neil Patel <neilp@cs.stanford.edu> wrote:
Yes, looking deeper there is I/O bound activities in the listener loop that is actually the slow part.


On Mon, Oct 7, 2019 at 6:09 PM Alexey Sibyakin <alex@freeswitch.com> wrote:
Hi,

That's your listener reads events too slow, you need to refactor it to be faster. Python may be slow, the same implementation with Go or .Net Core may give a lot of performance for free.

Regards,
Alex

Alex Sibyakin | Support Engineer SignalWire | 228 Hamilton Ave 3rd Floor, Palo Alto, CA 94303 Email: alex@freeswitch.com Website: https://www.signalwire.com



On Mon, Oct 7, 2019 at 7:40 PM Neil Patel <neilp@cs.stanford.edu> wrote:
Hi All,

I have an event listener script (Python) that listens for “CHANNEL_HANGUP_COMPLETE” events. Logs show that the script, which runs continuously in an infinite loop within supervisor, receives 1000 events every 15 mins.

At the same time we are making about 15K calls every 15 mins. So this script is 15x slower than the volume of calls and falls behind and often gets the “Queue size: [100000/100000] Max queue size reached” error.

My question is: how do I make the events reach the listener faster to keep up with the outbound call traffic?

Thanks.
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com