CPU maxed out 100% FPBX 17 Debian 12 in Proxmox VM — why?

Hello,

Vrigin install Debian 12 and then FreePBX 17 with the install script in a Proxmox VM. Two phones connected, can talk to each other. No SIP accounts yet. Nothing else installed: One CPU is maxed out constantly at 100% and >60% with two CPU’s assigned, on a 12 core i7-12700T.

What could possibly be wrong?

BTW, the official new iso install didn’t work. Had to install first Debian 12 and than use the 17 install script.

Thanks a lot for any help.

Hi @prxmx
Try to login your FreePBX Linux CLI and get more details which service hitting or loading CPU?
you can install and use htop btop top tools.
or
Bellow command will give you some details.

ps -eo pid,ppid,cmd,comm,%mem,%cpu --sort=-%cpu | head -10

1 vCPU is probably not going to cut it. As a general rule we allocate 8 vCPUs to each FreePBX17 instance and 8GB of ram, which works well up to about 50 users.

Here it is:

Any idea which of the modules in /var/www/html/admin/modules/ might be the culprit?

Thanks!

It’s the God (?) Daemon:

Do you have any not installed or Disabled modules?

fwconsole ma list

and check this command too pls.

# fwconsole pm2 --list

8 cpus and 8gb ram for fpbx17 is wild. I have hundreds of servers on 1 cpu, 2gb ram with no issues

1 Like

Check the pm2 processes:
fwconsole pm2 --list

And see if one is restarting a ton or specifically using CPU?

I had the same issue on a new installed FreePBX 17 some weeks ago. It was the node process using the file /var/www/html/admin/modules/sangomartapi/node/kickstart.js.

Disabling the module sangomartapi fixed the issue.

See also here:
High CPU! FreePBX17 Debian Install - Beta Program Issues - FreePBX Community Forums

1 Like

OK, I’m coming close. Thanks to @shahin and @eris the pm2 processes are:

$ fwconsole pm2 --list
+---------------------------+------+--------+----------+------------------+--------+----------+
| Process Name              | PID  | Status | Restarts | Uptime           | CPU    | Mem      |
+---------------------------+------+--------+----------+------------------+--------+----------+
| core-calltransfer-monitor | 2037 | online | 0        | 9 days, 23 hours | 0%     | 46.49MB  |
| core-fastagi              | 2151 | online | 0        | 9 days, 23 hours | 0.1%   | 68.19MB  |
| sangomartapi              | 2286 | online | 0        | 9 days, 23 hours | 111.4% | 141.23MB |
| ucp                       | 2527 | online | 0        | 9 days, 23 hours | 0.1%   | 90.42MB  |
+---------------------------+------+--------+----------+------------------+--------+----------+

And then, thanks to @joni1802 and the mentioned article — removing the sangomartapi process:

$fwconsole ma remove sangomartapi

Stopping old running processes...Stopping Sangoma RT API Server...
Stopped Sangoma RT API Server
Done
Done removing Chat database.
Dropping table restapps_rtapi_conferences...Done
Dropping table sangomartapi_registry...Done
Dropping table sangomartapi_login_register...Done
Dropping table chat_push_tokens...Done
Dropping table sangomartapi_call_queue_members...Done
Module sangomartapi successfully deleted
Updating Hooks...Done

$ fwconsole pm2 --list
+---------------------------+------+---------+----------+------------------+------+---------+
| Process Name              | PID  | Status  | Restarts | Uptime           | CPU  | Mem     |
+---------------------------+------+---------+----------+------------------+------+---------+
| core-calltransfer-monitor | 2037 | online  | 0        | 9 days, 23 hours | 0%   | 46.49MB |
| core-fastagi              | 2151 | online  | 0        | 9 days, 23 hours | 0%   | 68.82MB |
| sangomartapi              | 0    | stopped | 0        | 0                | 0%   | 0.00B   |
| ucp                       | 2527 | online  | 0        | 9 days, 23 hours | 0.3% | 90.27MB |
+---------------------------+------+---------+----------+------------------+------+---------+

Voilà — the host computer can rest again. And I will remove one core from the VM; makes much more sense this way:

The development team probably might want to take a look at that problem.
Thanks so much for your help.

Oh, I forgot to ask: what does the sangomartapi process do? :wink:

Its a API engine.

you can remove that service if you wish from pm2 list.

fwconsole pm2 --delete sangomartapi

Two virtual cpus are plenty for a smaller PBX system, at least using KVM running on Ubuntu. I have 4 wired and 3 wireless phones and sip trunk.
btw, never use more virtual cpus than real cpus that exist in the system, and leave one or two actual cpus free for the system’s OS to do its work.
In other words, if a system has 8 actual cpus/threads, only use up to 6 for a single VM if needed, and leave 2 free for the host.

Thanks for your sharing your experience. I believe it also has to do with the processing power of the chip. In my case, a handful of phones, I gave it one core and it doesn’t use more than 4% of CPU usage.