What is the problem of arrival cpu 100%

That’s Framework, not Asterisk.

Do you know what version of Asterisk it was after updating?

And which version of Asterisk are you using now?

The result of version

[[email protected] ~]# asterisk -r
Asterisk 15.7.2, Copyright © 1999 - 2016, Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

AsteriskNOW*CLI> core show version
Asterisk 15.5.0 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2018-07-25 22:19:48 UTC

Note:
The result I’m used now in live mode.

Ok. Is it still reaching 100% CPU?

In this time I have a big new problem , The server and service not working as fine when reboot the server after starting 5 min. the server not working between calling employees, If you can see my post below:

But you said that you rolled back because you couldn’t wait.

So do you currently have this issue?

Yes, I have the issue
And to assume that the problem CPU has not been resolved but I returned the oldest version and a new problem occurred to me during my reaction to the previous version and talk when I do the very operation of the server, I have already explained in my post below

Dear Mr. PitzKey,
I need to tell you about the last update in my case we have,
We restore the backup file (The old one) since 30 days, And update the server to last one (Astersik freepbx and framework) equal:
Current PBX Version:14.0.11
Current System Version:12.7.5-1902-3.sng7
Current Asterisk Version: 15.5.0
We rebooted many times to tested the server and after that the server stable and worked as fine without any issues tell now,
The H.W system information:
6 CPU virtual core
12 Ram
50 HDD
The system utilization

[[email protected] ~]# free -tm
total >>> used >>> free >>> shared >>> buff/cache >>> available
Mem: 11853 >>> 1049 >>> 9792 >>> 64 >>> 1011 >>> 10372
Swap: 5119 >>> 0 >>> 5119
Total: 16973 >>> 1049 >>> 14912

CPU was used 15% at the max.
And i will show you about the result of (top)

I will monitor the server if any issue i will update you,
Best Regards.

In this time i have some of high latency when i pinged from my pc to server, And the high latency that
Ascension has an effect on the server in the case if communication between two extensions is observed
There is a loss in the call while talking to two devices(extensions), what is the reason or where is likely the reason,
I will show you below:


Any help?

Be aware that ping uses icmp which is a very different and unrelated protocol than SIP uses (tcp/udp/tls/wss et al.) .

ICMP are the first packets dropped at the router when needed. A better metric is the “status” column shown by:-

rasterisk -x ‘sip show peers’

which is indicative of the latest SIP “roundtrip” between asterisk and the endpoint.

Dear Mr.Dicko,
When i try to check the command “rasterisk -x”, And the result
[[email protected] ~]# rasterisk -x
rasterisk: option requires an argument – ‘x’
How can apply the command !
At this time happens to me as well as the staff, while talking to the conversation occur in the talk between the two communications, and I did not notice anything in the ssh debugging " asterisk -vvvr"

By your estimation of the occurrence of such a situation, which is during the communication between the two parties continues to talk without problems but at some time occur cuts in the talk and this causes inconvenience to employees and after a few seconds of the connection is returned without any problems and this case frequent. How can i solve the issue?

I have several ( at least 5 ) freePBX servers that all experienced a similar issue. It looks like there are a lot of scheduled tasks in FreePBX crontab that all kick off at the top of the minute and all do database query’s. The fix for me was to change the crontab so that multiple tasks did not kick off at the same time (note this will probably [likely] be overwritten with future updates) and ultimately I had to upgrade ALL my systems to SSD disks to effectively eliminate the issue. (now it occurs very infrequently). My virtual server provider has an open ticket with Sangoma about this issue I had.

1 Like

Did you enable FastAGI?

This is my solution also. Editing the cron and the CPU spikes disapear on each minute.
Only problem is the module updates changes the cron back to FreePBX default settings.
FastAGI helps, but not as much as editing the cron jobs.
Ik inserted a sleep command with random time. Mostly on the commercial modules.
Just try it and compare cpu spike at the whole minute:
Change next line in the cron:
crontab -e -u asterisk
*/1 * * * * var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null
into
*/1 * * * * sleep $(( ( RANDOM % 40 ) + 1 )) && var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null

Make sure you make a backup first of /var/spool/cron/asterisk

How can i see or route to arrival? :
*/1 * * * * var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null
into
*/1 * * * * sleep $(( ( RANDOM % 40 ) + 1 )) && var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null

Check the difference with the time command
for example:
time sleep $(( ( RANDOM % 40 ) + 1 )) && /var/lib/asterisk/bin/pagepro-scheduler.php
compared to original
time /var/lib/asterisk/bin/pagepro-scheduler.php

My best practice was a screen recorder en record cli at the command line the next command:
Than you can easily pause the recorded screen at the whole minute and see what hgappens.
A bit simple, but it works for me. :slight_smile:

top -d 0.5 -u asterisk -c
And at the whole minute, you can see exactly, which cron, with which file, takes al the CPU power.

This result i Found

*/1 * * * * /var/lib/asterisk/bin/pagepro-scheduler.php 2>&1 >/dev/null
And in your command replied i set to :
time sleep $(( ( RANDOM % 40 ) + 1 )) && /var/lib/asterisk/bin/pagepro-scheduler.php
Suppose i changed whats the result can i have? For example the issue can solve or not back again, After i change ?
Please advice

It is hard to help you this way.
The best way is ta hire some help from Sangoma, or anyone who wants to help.
Maybe it is possible to use Teamviewer en let someone look with you to what is happening in your PBX.
If you want me to help, you can send me a private message.

Thank you,
In before 3 days i upgrade the server to the last version, After that i change the server from machine to another machine server and rebooted the server so in this time the server sort of stable, I monitor the server if any issue back again i will posted in this community,
Thank you again for your advice

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