After lots of experimenting, I discovered that this process is causing the ARI to return “Out of memory” errors:
3667 ? Ssl 0:00 PM2 v4.5.0: God Daemon (/home/asterisk/.pm2)
So I killed that process and suddenly my ARI command works!!! I am running AlmaLinux 8.
I am not familiar with PM2/God Daemon, but I discovered the FreePBX distro includes a PM2 module. I tried to disable the module (fwconsole ma disable pm2) but that would disable the api and ucp modules too.
I don’t know much about PM2 or FreePBX config, but I found this
(/var/www/html/admin/modules/pm2/node/node_modules/pm2/lib/templates/sample-apps/http-server/ecosystem.config.js) config file which contains:
module.exports = {
apps : [{
name: 'API',
script: 'api.js',
instances: 4,
max_memory_restart: '1G',
env: {
NODE_ENV: 'development'
},
env_production: {
NODE_ENV: 'production'
}
}]
};
In case that provides a clue to anyone with more PM2 knowledge.
Anyone know how to change the PM2 configuration / FreePBX configuration to fix this behavior?