Asterisk Malfunctioning after Limiting CPU Usage

I am using Asterisk 11.6 in CentOS 6.4 (64 bits) installed on HP G7 Server. When I start increasing the number of calls on the system, I observed abnormal behaviour in CPU usage as it was going beyond 1600%. Also when calls exceed the count of 30, voice quality starts dropping until you are unable to hear any.

I tried searching and putting a limit to the CPU usage up to 40% at first and than started increasing the limit, but whenever I start terminating the calls, Asterisk starts acting up and you either get a call full of distortions or with silence.

I have tried reinstalling Asterisk as well as OS. I have checked Asterisk 11 specifically on both x86 and x64. It is working fine on Asterisk 1.4 but I am not sure if it will work on any version beyond 11. If someone can provide assistance to resolve this as I need to use Asterisk 11 atleast.

Every system has its limits. It’s possible you have just hit the max number calls your server can handle given your setup.

It’s also possible you’ve run across a bug. Asterisk 11 reached “end of life” some time ago now. I would highly recommend upgrading to a supported version. If it is a bug it’s quite possible it’s been fixed by now. If it’s still a problem then you’re more likely to receive help if you are on a new version. As well any bug fix will only be put into a new release of currently supported versions.

Barring that you’ll have to give more information, and start narrowing things down given your setup. For instance, check the logs. Are there any errors? Are you recording calls? Using CDRs? If so what happens if you disable recording, or disable CDRs? Use CLI commands to see if channels are “stuck” etc…

@kharwell Yes I have been using CDRs and I have not tried disabling it as I am using these setups in live corporate environment where we use these CDRs to calculate terminated minutes for for billing purposes.

However, I have checked for logs related to any crashes and also checked if channels are stuck, but they are not. Calls are connecting properly but there is some issue as I mentioned earlier too that when calls reach the count of 30, services start degrading, voice quality is affected as well as a delay is observed prior to connection. Also I observed abnormal behavior in CPU usage which reaches up to 1600% which is basically my concern, because as far as my understanding is concerned, CPU usage should not go beyond 100%, and that too happens in problematic situations. 1600% is far too big and itself an abnormal value.

I have checked using even older version of Asterisk (i.e 1.4) and it is working fine, even connecting calls beyond 150 without such issues.

I would highly recommend setting up a test box prior to moving any production system to a new version.

If you are using a program like top to view CPU usage then it can report CPU usage over 100% if your system has multiple socket, cores, and threads (sockets * cores * threads per core). See the top man page for more information.

Basically though something is consuming your CPU causing other processes, and threads to “starve”. Thus the call degradation. If Asterisk is the culprit then you either need to upgrade to a newer version (recommended) and see if it fixes the problem, or figure out a way to narrow down what in Asterisk is causing the problem. Again by potentially disabling subsystems to figure out which one, if any, it is. Other people may have other ideas on what to try.

There must be some issue with its compatibility with CentOS 6 64 bit as issue is now resolved after I switched from CentOS 6 64bit to CentOS 6 32bit. I have tried connecting up to 90 calls and all entities are intact.

Thanks for your support anyways. Much appreciated.