# AMI stopped working at 20 active calls

**URL:** <https://community.asterisk.org/t/ami-stopped-working-at-20-active-calls/88282>\
**Category:** Asterisk APIs\
**Created:** [April 15, 2021, 4:07am UTC](https://community.asterisk.org/t/ami-stopped-working-at-20-active-calls/88282 "2021-04-15T04:07:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilslimxdgx](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@lilslimxdgx](https://community.asterisk.org/u/lilslimxdgx)\
**Post date:** [April 15, 2021, 4:07am UTC](https://community.asterisk.org/t/ami-stopped-working-at-20-active-calls/88282/1 "2021-04-15T04:07:59Z")

</div>

I’m using Asterisk 16.3.0 and connect to AMI to get CDR and Call events  
At over 20 active calls, AMI stopped working, I can’t even run ‘manager show connected’ in asterisk cli  
Are there any way to improve AMI performance?

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [April 15, 2021, 8:40am UTC](https://community.asterisk.org/t/ami-stopped-working-at-20-active-calls/88282/2 "2021-04-15T08:40:42Z")

</div>

You are using an old version of Asterisk, and changes were made in that area of code. I don’t think anyone will look into this or investigate unless you confirm it occurs on a recent version.

---

<div class="post-metadata">

**Author:** ![lilslimxdgx](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@lilslimxdgx](https://community.asterisk.org/u/lilslimxdgx)\
**Post date:** [April 23, 2021, 4:48am UTC](https://community.asterisk.org/t/ami-stopped-working-at-20-active-calls/88282/3 "2021-04-23T04:48:53Z")

</div>

Hi @jcolp ,  
I deployed Asterisk 18.03, it’s a bit better but ami stop sending events at 40 concurent calls

---

<div class="post-metadata">

**Author:** ![khamlichi.khalil](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@khamlichi.khalil](https://community.asterisk.org/u/khamlichi.khalil)\
**Post date:** [April 23, 2021, 5:35am UTC](https://community.asterisk.org/t/ami-stopped-working-at-20-active-calls/88282/4 "2021-04-23T05:35:52Z")

</div>

What are your ulimit settings ?  
What is your CPU load at this moment ?  
What is the CPU load on the application server side at this moment ?

Do you limit events to only the required ones ?  
Are you sure your application is processing the events in a timely manner ? I believe Asterisk buffers events not received by the application internaly do if the buffer gets too big it might affect performance. I might be wrong though. Maybe someone will tell us.  
And no need to mention that manager debug must be turned off .

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [May 23, 2021, 5:36am UTC](https://community.asterisk.org/t/ami-stopped-working-at-20-active-calls/88282/5 "2021-05-23T05:36:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
