Hi guys,
After a lot of testing, I/we might have found a solution that will fix the huge CPU-spikes every minute. And after a lot of knowledge we are sure that the problem is caused by the commercial-modules and the PHP-zend module. The encryption module php-zend takes a lot of cpu when it is used to run a cronjob. This is a fact, cause I’m not the only one who is saying it. Actually, a lot of prof-developers admit it is using a lot of cpu.
And still FreePBX is running a cronjob every minute, with the php-zend module. The php-zend module is necessary to run nor letting work the commercial-modules. But the problem is; you can’t disable it. You also can’t remove the cronjob, because FreePBX automatically puts the cronjob back.
So, then we have to look at another solution. This is the solution that worked for me:
I’ve tried the system on CentOS 7, and it is giving the cpu-spikes. Then someone said ‘what if we run it on Ubuntu 18? Is Ubuntu 18 nor php 7 still supporting php-zend?’. And that’s what made me curious. What if I can make a fully, dedicated, efficiently, and fast instance of FreePBX 14 at PHP 7 and Ubuntu 18? So, there we go.
It wasn’t pretty difficult with the tutorials down below. The only thing you have to do is changing a deprecated each function. The command for that is standing in the instructions of FreePBX self (click here).
So, it is almost sure, that FreePBX can run on PHP 7 and Ubuntu 18.04. Only problem? They don’t recommend it, so they also won’t give support. But what does it care? It solves the CPU-problem.
This solution did worked for me. I’m not saying this is a permanent solution. I’m just saying this is a solution to solve the problem. Not saying it is a recommended solution to use. Not saying it is a great solution. Just saying that it might work. It did for me.
Extra links to try the installation:
Install FreePBX 14 with PHP 7:
(click here)
BUT! DONT USE THE ASTERISK INSTALL INSTRUCTIONS IN THERE. BUT USE THE DOCUMENTATION FOR ASTERISK 16 DOWN BELOW:
(click here)
When applying the config you will get a “each” syntax error. Just run this command in the command-line:
sed
-i
's/ each(/ @each(/'
/usr/share/php/Console/Getopt
.php
Let me know if this is the real solution.
P.S. I removed the voice-memo cause a lot of people said I was just trolling with them. So, I typed it out. I didn’t removed the thread out myself. First it was hidden, then my account was freezed, and then suddenly Andrew said I could replace the thread with the original one again.
Kind regards,
Serge