I have a Virtual Server (FreePBX distro 16/Asterisk 18.9), 15 cores 16 GB ram 90GB Free. Looks very good resource-wise.
I am seeing the performance bottom (delays in call processing, can answer phone calls, apply config takes 10 minutes, etc.) out when I get to 30 active channels (call recording on), but I am not close to maxing out the system.
Is there a way to see if the MySQL or SQLite databases, or the disk might be the problem?
Clearly it is choaking on something, but I don’t know what it could be.
You can also look more at mysql,
show processlist
Will tell you the queries running which can help identify if you have something long running. Most queries are short lived.
Is he mqsql local or remote?
At the command line
also iotop will help to identify disk usage.
vmstat 1 will help show you wait time on the cpu along with cpu time. wait time is frequently wait on io time.
Mysql can have a lot of different issues,
insall mytop and run to get some additional insight.
Some things that go wrong can be sometimes resolved with rebuilding indexes, like doing an optimize table on tables.
Some things might be able to be resloved with allocating more memory to mysql. but the first steps are to identify what is he consumption of resources.
I installed sysstat and will try mytop now as well. Post reboot things are working well, but it seems to happen every Thursday. At least I’ll be ready this time. I did upgrade from Asterisk 16.9 to 18 LTS certified. I’ll report back when the next incident hits.
I don’t see a problem in that screen shot. Nohing is running. you may look at enablly the slow query log as well in mysql but right now its not know if the issue is disk subsystem or the database engine.
From running mysql and asterisk realtime, I can tell you that the fastest way to make asterisk fall over is to couple it to the database and have 400 phones continually registering there by generating a lot of small queries. the query time isn’t what kills you its the backup in processing queries. Phones will drop off and on and is because mysql can’t keep up with the writes.
Good to know, but as fate would have it this is just a bunch (70 queues, 1-2 agents per, about 40 channels max at one time, Asternic Call Center Stats installed) of custom extensions, that are all tied to mobile phones (extension 555.555.5555, FMFM is 1.555.555.5555#). These extensions take queue calls 99% of the time, and use DISA 1% of the time. Virtual 14 cores, 16gb ram, 1Gbps connection, 80GB free disk, the box doesn’t look stressed at all, but something is happening that causes it to gridlock. Thanks to you guys, hopefully I’ll be able to see it this time.
I doubt the call load is the issue. Its likely something more. Any cron jobs running Thursdays? Is the vm inside of environment where something else happens? ie it runs great until the accounting dept. runs billing job on thursdays…
Started seeing long pauses when I call a number and when the IVR greeting starts playing. Looks like it is happening earlier this week. I notice this in the logs: WARNING[26840][C-00000fd3]: channel.c:1080 __ast_queue_frame: Exceptionally long voice queue length queuing to Local/1XXXXXXXXXX@from-internal-00006749;1
I only see about 30 channels up (that is as close to as high as it gets):
*CLI> core show channels
Channel Location State Application(Data)
Local/1#########1264@fr s@macro-dialout-trun Up Dial(SIP/AVAYA-1/#########1264,30
Local/1#########1264@fr s@macro-dial:1 Up AppDial((Outgoing Line))
Local/1#########1349@fr s@macro-dialout-trun Up Dial(SIP/AVAYA-1/#########1349,30
Local/1#########1349@fr s@macro-dial:1 Up AppDial((Outgoing Line))
SIP/AVAYA-1-000028d3 s@macro-dialout-trun Up AppDial((Outgoing Line))
SIP/AVAYA-1-000028d5 (None) Up AppDial((Outgoing Line))
SIP/AVAYA-1-000028d4 (None) Up AppDial((Outgoing Line))
SIP/AVAYA-1-000028a6 2010@ext-queues:67 Up Queue(2010,t,,custom/health-fa
SIP/AVAYA-1-000028c7 2012@ext-queues:67 Up Queue(2012,t,,custom/health-fa
SIP/AVAYA-1-000028c2 2014@ext-queues:67 Up Queue(2014,t,,,,,,,0,)
SIP/AVAYA-1-000028c3 5033@ext-queues:67 Up Queue(5033,t,,,,,,,0,)
SIP/AVAYA-1-000028ba 2018@ext-queues:67 Up Queue(2018,t,,custom/#######
SIP/AVAYA-1-000028cf 2027@ext-queues:67 Up Queue(2027,t,,custom/MLT_CT,,,
SIP/AVAYA-1-000028cb s@macro-dialout-trun Up AppDial((Outgoing Line))
SIP/AVAYA-1-000028b5 s@macro-dialout-trun Up Dial(SIP/AVAYA-1/7001018831,30
SIP/AVAYA-1-000028b3 2014@ext-queues:67 Up Queue(2014,t,,custom/health-fa
SIP/AVAYA-1-000028b9 (None) Up AppDial((Outgoing Line))
Local/#########3245@fro 2018@from-queue:1 Up AppQueue((Outgoing Line))
Local/#########3245@fro s@macro-dial:29 Up Dial(Local/FMPR-#########3245@fro
Local/#########3277@fro 2012@from-queue:1 Up AppQueue((Outgoing Line))
Local/#########3277@fro s@macro-dial:29 Up Dial(Local/FMPR-#########3277@fro
Local/1#########1484@fr s@macro-dial:1 Up AppDial((Outgoing Line))
Local/1#########1484@fr s@macro-dialout-trun Up Dial(SIP/AVAYA-1/#########1484,30
Local/1#########1832@fr s@macro-dial:1 Up AppDial((Outgoing Line))
Local/1#########1832@fr s@macro-dialout-trun Up Dial(SIP/AVAYA-1/#########1832,30
Local/#########3220@fro s@macro-dial:29 Up Dial(Local/FMPR-#########3220@fro
Local/#########3220@fro 2014@from-queue:1 Up AppQueue((Outgoing Line))
Local/#########1349@fro s@macro-dial:29 Up Dial(Local/FMPR-#########1349@fro
Local/#########1349@fro 5033@from-queue:1 Up AppQueue((Outgoing Line))
Local/#########3228@fro #########3228@followme- Ring GotoIf(1?DIALGRP)
Local/#########3228@fro #########3228@from-queu Down AppQueue((Outgoing Line))
31 active channels
17 active calls
The system is still processing some calls, so it would be ideal to not to suspend/restart asterisk. IS there anything else I can look at prior to the backtrace that might help me identify the root cause?
When I do a test call, I have about 10 seconds of silence. On the call log I can see it going step by step, really slowly. Until the 10th second, then it blasts though (and the IVR audio begins). Nothing exceptional is happening at this time, it’s just setting variables. Almost bogged down.
@dicko I notice it doesn’t create the file until the next day sar06 so I can provide that too, but the output is 50ish pages long, is there a subset to put in the pastebin, or the whole thing?
This would mean the audio frames are queueing up and the thread isn’t reading them fast enough. Still requires a backtrace.
The only other thing you can do is update Asterisk. You are on 18.9 and the current release is 18.18. Even if the distro is at 18.17 or something more current you can try that and see if it resolves the issue.