High Memory Usage - V14

I’m running FreePBX V14 with Asterisk 13.22
Current System Version: 12.7.6-1904-1.sng7

I am running queues which may contribute but within a week my memory is pretty well pegged at max and I start to see degraded call quality. Below is my htop page after 6d uptime. Is there a way besides a weekly reboot(which I’ve been doing) to keep my memory under control? Thank you

Do you have FastAGI enabled?

Currently in advanced settings I have

Launch local AGIs through FastAGI Server - Set to No

Do you recommend setting this to yes for decreased memory consumption?

1 Like

I’m a bit confused regarding the AGI. Does every inbound call utilize AGI or only special calls using some sort of script?

Calls are currently being processed through a queue. Not sure if that utilizes AGI in some way.

It will depend on which modules you are using, and the call flows you have set up, but AGI scripts can be used a fair bit. This grep will show you the current day’s AGI usage:

grep "Launched AGI Script" /var/log/asterisk/full
1 Like

Very interesting. Looks to be sangoma crm module along with transferring a call that is being recorded. ( I included a very brief snippet below)

I’ll definitely try the Fast AGI option and probably disable sangoma crm along the way

[2019-08-19 13:54:20] VERBOSE[14900][C-0000d3ff] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 13:54:20] VERBOSE[14900][C-0000d3ff] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 13:55:10] VERBOSE[18257][C-0000d43e] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 13:57:45] VERBOSE[14085][C-0000d3f1] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 13:57:45] VERBOSE[14053][C-0000d3f1] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 14:00:39] VERBOSE[19887][C-0000d458] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 14:04:10] VERBOSE[11406][C-0000d3bd] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 14:05:07] VERBOSE[21432][C-0000d474] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 14:08:29] VERBOSE[20137][C-0000d458] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 14:08:29] VERBOSE[19861][C-0000d458] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 14:11:58] VERBOSE[23267][C-0000d497] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 14:14:28] VERBOSE[23267][C-0000d497] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 14:14:28] VERBOSE[23267][C-0000d497] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 14:16:15] VERBOSE[23695][C-0000d49f] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 14:22:44] VERBOSE[26394][C-0000d4d3] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 14:23:41] VERBOSE[25408][C-0000d4bd] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-08-19 14:23:41] VERBOSE[25357][C-0000d4bd] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-08-19 14:24:11] VERBOSE[27016][C-0000d4db] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi

If you don’t use it, then

fwconsole ma delete sangomacrm

Always do this.

This is one of the main reasons I remove all unused commercial nodules on a new install. Not because commercial modules suck (because they don’t) but because extra things running that are not used are a security issue waiting to happen and/or an extra process load waiting to kill your system and/or an update issue waiting to take your system down.

If I was being super picky, I could likely get rid of a few of the GPL modules too, but I use most in one fashion or another.

[[email protected] ~]$ sudo fwconsole ma listonline
No repos specified, using: [standard,commercial] from last GUI settings

+----------------------+------------+---------------------------------------------+-------------+
| Module               | Version    | Status                                      | License     |
+----------------------+------------+---------------------------------------------+-------------+
| accountcodepreserve  | 13.0.2.2   | Enabled and up to date                      | GPLv2       |
| amd                  | 13.0.3     | Enabled and up to date                      | GPLv3+      |
| announcement         | 13.0.7.7   | Enabled and up to date                      | GPLv3+      |
| areminder            |            | Not Installed (Available online: 14.0.4.13) | Commercial  |
| arimanager           | 13.0.5.2   | Enabled and up to date                      | GPLv3+      |
| asterisk-cli         | 14.0.1     | Enabled and up to date                      | GPLv3+      |
| asteriskinfo         | 13.0.7.1   | Enabled and up to date                      | GPLv3+      |
| backup               | 14.0.10.3  | Enabled and up to date                      | GPLv3+      |
| blacklist            | 14.0.2     | Enabled and up to date                      | GPLv3+      |
| broadcast            |            | Not Installed (Available online: 14.0.1.12) | Commercial  |
| builtin              |            | Enabled; Not available online               |             |
| bulkhandler          | 13.0.14.8  | Enabled and up to date                      | GPLv3+      |
| calendar             | 14.0.2.16  | Enabled and up to date                      | GPLv3+      |
| callback             | 13.0.5.4   | Enabled and up to date                      | GPLv3+      |
| callerid             |            | Not Installed (Available online: 13.0.8.16) | Commercial  |
| callforward          | 14.0.1.3   | Enabled and up to date                      | AGPLv3+     |
| calllimit            |            | Not Installed (Available online: 13.0.5.7)  | Commercial  |
| callrecording        | 14.0.14    | Enabled and up to date                      | AGPLv3+     |
| callwaiting          | 14.0.1.1   | Enabled and up to date                      | GPLv3+      |
| campon               | 13.0.4.1   | Enabled and up to date                      | GPLv3+      |
| cdr                  | 14.0.5.19  | Enabled and up to date                      | GPLv3+      |
| cel                  | 14.0.2.12  | Enabled and up to date                      | GPLv3+      |
| certman              | 14.0.3.2   | Enabled and up to date                      | AGPLv3+     |
| cidlookup            | 14.0.1.8   | Enabled and up to date                      | GPLv3+      |
| conferences          | 13.0.23.15 | Enabled and up to date                      | GPLv3+      |
| conferencespro       |            | Not Installed (Available online: 14.0.2.9)  | Commercial  |
| configedit           | 13.0.7.1   | Enabled and up to date                      | AGPLv3+     |
| contactmanager       | 14.0.5.4   | Enabled and up to date                      | GPLv3+      |
| core                 | 14.0.25.4  | Enabled and up to date                      | GPLv3+      |
| cos                  | 13.0.12.5  | Enabled and up to date                      | Commercial  |
| customappsreg        | 13.0.5.7   | Enabled and up to date                      | GPLv3+      |
| cxpanel              |            | Not Installed (Available online: 14.0.2)    | GPLv3       |
| dahdiconfig          | 14.0.1.4   | Enabled and up to date                      | GPLv3+      |
| dashboard            | 14.0.6.2   | Enabled and up to date                      | AGPLv3+     |
| daynight             | 14.0.1     | Enabled and up to date                      | GPLv3+      |
| dictate              | 13.0.5     | Enabled and up to date                      | GPLv3+      |
| digium_phones        |            | Not Installed (Available online: 13.0.7.4)  | GPLv2       |
| digiumaddoninstaller | 13.0.1.1   | Enabled and up to date                      | GPLv2       |
| directory            | 13.0.19.12 | Enabled and up to date                      | GPLv3+      |
| disa                 | 13.0.6.12  | Enabled and up to date                      | AGPLv3+     |
| donotdisturb         | 14.0.1.1   | Enabled and up to date                      | GPLv3+      |
| endpoint             | 14.0.9     | Enabled and up to date                      | Commercial  |
| extensionroutes      |            | Not Installed (Available online: 13.0.10.7) | Commercial  |
| fax                  | 14.0.2.7   | Enabled and up to date                      | GPLv3+      |
| faxpro               |            | Not Installed (Available online: 14.0.8)    | Commercial  |
| featurecodeadmin     | 13.0.6.4   | Enabled and up to date                      | GPLv3+      |
| findmefollow         | 14.0.1.23  | Enabled and up to date                      | GPLv3+      |
| firewall             | 13.0.57.1  | Enabled and up to date                      | AGPLv3+     |
| framework            | 14.0.13.4  | Enabled and up to date                      | GPLv2+      |
| freepbx_ha           |            | Not Installed (Available online: 13.0.11)   | Commercial  |
| fw_langpacks         | 14.0.1     | Enabled and up to date                      | GPLv3+      |
| hotelwakeup          | 14.0.1.6   | Enabled and up to date                      | GPLv2       |
| iaxsettings          | 14.0.1.4   | Enabled and up to date                      | AGPLv3      |
| infoservices         | 13.0.1.4   | Enabled and up to date                      | GPLv2+      |
| irc                  | 13.0.1     | Enabled and up to date                      | GPLv3+      |
| ivr                  | 14.0.4     | Enabled and up to date                      | GPLv3+      |
| languages            | 14.0.1.4   | Enabled and up to date                      | GPLv3+      |
| logfiles             | 13.0.10.5  | Enabled and up to date                      | GPLv3+      |
| manager              | 13.0.2.5   | Enabled and up to date                      | GPLv2+      |
| miscapps             | 13.0.3.1   | Enabled and up to date                      | GPLv3+      |
| miscdests            | 13.0.7     | Enabled and up to date                      | GPLv3+      |
| music                | 13.0.22.7  | Enabled and up to date                      | GPLv3+      |
| outroutemsg          | 14.0.1     | Enabled and up to date                      | GPLv3+      |
| paging               | 14.0.12    | Enabled and up to date                      | GPLv3+      |
| pagingpro            |            | Not Installed (Available online: 14.0.2.15) | Commercial  |
| parking              | 13.0.19.11 | Enabled and up to date                      | GPLv3+      |
| parkpro              |            | Not Installed (Available online: 14.0.2.9)  | Commercial  |
| pbdirectory          | 2.11.0.6   | Enabled and up to date                      | GPLv3+      |
| phonebook            | 13.0.6.4   | Enabled and up to date                      | GPLv3+      |
| pinsets              | 13.0.13    | Enabled and up to date                      | GPLv3+      |
| pinsetspro           |            | Not Installed (Available online: 13.0.9.14) | Commercial  |
| pm2                  | 13.0.7.1   | Enabled and up to date                      | AGPLv3+     |
| pms                  |            | Not Installed (Available online: 14.0.2.37) | Commercial  |
| presencestate        | 14.0.1.7   | Enabled and up to date                      | GPLv3+      |
| printextensions      | 13.0.3.2   | Enabled and up to date                      | GPLv3+      |
| queueprio            | 13.0.6     | Enabled and up to date                      | GPLv3+      |
| queues               | 14.0.2.25  | Enabled and up to date                      | GPLv2+      |
| queuestats           |            | Not Installed (Available online: 14.0.1.27) | Commercial  |
| qxact_reports        |            | Not Installed (Available online: 14.0.7.16) | Commercial  |
| recording_report     |            | Not Installed (Available online: 14.0.2.4)  | Commercial  |
| recordings           | 13.0.30.13 | Enabled and up to date                      | GPLv3+      |
| restapi              | 13.0.21.2  | Enabled and up to date                      | AGPLv3      |
| restapps             | 14.0.1     | Enabled and up to date                      | Commercial  |
| ringgroups           | 14.0.1.8   | Enabled and up to date                      | GPLv3+      |
| sangomacrm           |            | Not Installed (Available online: 14.0.2.5)  | Commercial  |
| setcid               | 13.0.6.3   | Enabled and up to date                      | GPLv3+      |
| sipsettings          | 14.0.27.12 | Enabled and up to date                      | AGPLv3+     |
| sipstation           |            | Not Installed (Available online: 14.0.3)    | Commercial  |
| sms                  | 14.0.4.6   | Enabled and up to date                      | Commercial  |
| soundlang            | 14.0.7     | Enabled and up to date                      | GPLv3+      |
| speeddial            | 2.11.0.4   | Enabled and up to date                      | GPLv3+      |
| superfecta           | 14.0.18    | Enabled and up to date                      | GPLv2+      |
| sysadmin             | 14.0.33    | Enabled and up to date                      | Commercial  |
| timeconditions       | 14.0.2.17  | Enabled and up to date                      | GPLv3+      |
| tts                  | 13.0.13    | Enabled and up to date                      | GPLv3+      |
| ttsengines           | 13.0.7.5   | Enabled and up to date                      | AGPLv3      |
| ucp                  | 14.0.3.3   | Enabled and up to date                      | AGPLv3+     |
| userman              | 14.0.3.49  | Enabled and up to date                      | AGPLv3+     |
| vega                 |            | Not Installed (Available online: 14.0.3.17) | Commercial+ |
| versionupgrade       |            | Not Installed (Available online: 14.0.3)    | Commercial  |
| vmblast              | 13.0.11    | Enabled and up to date                      | GPLv3+      |
| vmnotify             |            | Not Installed (Available online: 14.0.1.5)  | Commercial  |
| voicemail            | 14.0.6.6   | Enabled and up to date                      | GPLv3+      |
| voicemail_report     |            | Not Installed (Available online: 13.0.13.3) | Commercial  |
| vqplus               |            | Not Installed (Available online: 14.0.1.36) | Commercial  |
| weakpasswords        | 13.0.2     | Enabled and up to date                      | GPLv3+      |
| webcallback          |            | Not Installed (Available online: 13.0.11.5) | Commercial  |
| webrtc               | 14.0.3.8   | Enabled and up to date                      | GPLv3+      |
| xmpp                 | 14.0.1.19  | Enabled and up to date                      | AGPLv3      |
| zulu                 | 14.0.56.16 | Enabled and up to date                      | Commercial  |
+----------------------+------------+---------------------------------------------+-------------+

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.