We host 35vm of FreePBX and got into a problem of Audio dropout with some VM, after investigation its look like its caused by the High CPU usage of these 2 cronjob: * * * * * [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] /var/www/html/admin/modules/dashboard/scheduler.php > /dev/null
and * * * * * [ -x /var/lib/asterisk/bin/schedtc.php ] && /var/lib/asterisk/bin/schedtc.php
I found 2 thread about that similar issue without a real solution or a permanent fix.
This problem is still here.
I think it has something to to with encrypted php files with Zend and Commercial modules, because older PBX systems <= FreePBX 2.11 did not have this problem if they where not activated.
I know for sure, that all the default installed VPSs have this problem. High Cpu spikes on servers with more than 15 pcs FreePBX Distro VPSs. All at 60seconds (whole minute).
It is a bug, but only for hosting providers which Host multiple FreePBX VPSs
You are showing me “php processes” no idea what they are actually calling. Now you are showing me three PHP processes when we are talking about one script. Each one is using 25% CPU. Since scheduler has a lock wait, three php processes can’t even happen at the same time from scheduler. Which is what you are blaming all of your problems on. In your first screenshot you have 11 PHP processes running. They are not all dashboard. Perhaps you should look and see WHAT the php process is doing or what php script is actually running before blindly placing blame on something randomly.
You can run ps aux | grep php to see what scripts are actually being run.
No. You are monitoring these two scripts, they are both 0% CPU but you say they are both causing 60% CPU. None of your data lines up. Look at the other processes that are actually using CPU. (which in your aux are none of them). You basically just choose the two processes that run every minute without digging into them further, schedtc.php does nothing, scheduler.php performance was improved in dashboard 22.214.171.124.
In fact your data shows that all processes are using 0.0% CPU. My guess would be use the commands I provided to you and when you have high CPU run them to figure out what processes are using that CPU.
You also commented out calendar. All calendar does is connect to the internet and download ical files. It does no further processing. Are you fully updated on these machines?
I can’t tell what php processes are using cpu. I can’t even say it’s the cron jobs. You keep using top so it’s impossible to tell what is doing what. Try using htop or something that can tell you what the php processes are doing.
I have noticed, if I install >15pcs VPS FreePBX systems on one host, the get a problem with CPU spike on the whole minute.
This is with Default settings in FreePBX 13 and 14.
This is a simple fact. (bug or problem in default Distro versions)
If it is fixed in v14, what is the fix?
We can diagnose the whole day for different configs, but it is a fact that there is a problem in the default configs.
I don’t want to be negative, but it feels like the problem is not discussed, nor acknowledged by Sangoma. Just how to diagnose your cron jobs, does not help much.
We have to come to some sort of issue for the team to be able to diagnose. If you think that doesn’t help much then I’m at a complete loss as to how to help you. I work for Sangoma. Sangoma is right here in this thread trying to get to the bottom of it by asking for detailed information about what processes have issues to then just get dismissed with “does not help much”. Sangoma employees do not have to participate in these forums at all.
Don’t know what you expect. Remember that we also run a hosting service so it would be against our better interests to document and detail everything we do in our own cloud environments. If we did that anyone could just copy what we do and Sangoma would cease to exist and so would freepbx development.