Good day everyone
We have a problem with bad sound quality on high ram using and big queue on manager_topic task. Based on suggestion from last post, (link on post below) we started use FastAGI instead of AGI. Besides this, we set 20Gb ram and 4 cpu to asterisk VM. After 3 days working on simultaneously 100 inbound and outbound calls we get many complaints on sound quality, it becomes intermittent and metalic. Asterisk process used 9.8Gb ram, VM LA was up to 3. Monitoring screens attached to post.
Also, there is one message at logs, which repeated many times:
taskprocessor.c:913 in taskprocessor_push: The ‘subm:manager_topic-00000007’ task processor queue reached 3000 scheduled tasks again.
We using ami for originate outbound calls. Maybe it somehaw connected.
Output from command “core show taskprocessors” attached to post.
Why asterisk used such memory size and sound becomes bad?
Is anybody have some ideas or suggestions how to fix it?
Good day everyone
Your graph appears to show at least 10GB of RAM, not 2.5GB (20Gb) that you say is available.
However, my main problem is that I don’t know how it is being produced, so am not convinced that it isn’t the figure for the whole virtual machine. If the Asterisk process grows in this way, you probably have a memory leak, but if the whole VM grows like this, that is normal, and you need to look at the VM host as a whole, and the resources allocated to all its VMs.
Thanks for reply. VM has 4 cpu cores and 20GB ram. Last screen is the using resources Asterisk process, not VM. This graph has dynamically the upper limit.
Which version of Asterisk are you using? (Really needs to be 16.18.0, or 18.4.0, for anyone to seriously look into it. If you are still using 11.9.0, there is no point in going further until you upgrade.)
Are you using any add-ons?
What is happening, which is out of the ordinary when the memory usage goes up? (In general, problems that occur with normal usage will be found by many people and fixed early.)
Asterisk version 16.2.1 on ubuntu 20.04. What addons do you mean? We use AMI telnet for originate calls, AMI http for some statistic, php scripts running through FastAGI to get external data.
Some time ago we tried to find out why memory acquires such size by compiling asterisk with MALLOC_DEBUG Flag. After start almoust all memory asterisk allocate to manager.c but it increase to 460MB only first 30 minutes, and then this value does not change. But memory used by asterisk process get large all time.
It can be some cahing in asterisk or something like that?
Sorcery module enabled, but on screen you can see that it not used
asterisk -rx “core show taskprocessors”|grep sorcery
sorcery/bucket-00000000 0 0 0 450 500
sorcery/file-00000001 0 0 0 450 500
sorcery/log_mappings-00000009 0 0 0 450 500
Some people use shared objects that aren’t supplied as part of Asterisk. These can be codecs, but one recent example was app_konference.so.
You either need to upgrade to Asterisk 16.18.0 or go through the detailed change history for asterisk to see if any memory leaks were fixed. It is unlikely anything will get fixed if you don’t actually upgrade, but the change history may give you a clue as to what is triggering the problem.
If this is an Ubuntu package, it is unlikely to be a pure 16.2.1. If you built it yourself, you should have no difficulty upgrading.
The change log is https://raw.githubusercontent.com/asterisk/asterisk/16.18/ChangeLog There are several memory leaks fixed between 16.2 and 16.18.
Nothing like that. Just a asterisk from the repository and its interfaces such as AMI and FAGI
Thanks, we will try to use 16.18.0
Test with asterisk 16.18.0 show the same problem. We got 6,8GB memory used by asterisk process.
asterisk -rx “memory show summary”|grep “all allocations and deferred free allocations”
1318879595 bytes in all allocations and deferred free allocations
But here we have only 1257.78 MB used memory and its decreases
There are specific periods when the memory usage is climbing. You need to ask yourself what is happening in those times that is not happening at other times.
We tried to look up something with such start time or work period between increeasing line on screenshot . There is a couple of crontab scripts, but it work every minute or every hour. Whatever it is, at asterisk process we have no any automathization, changing work conditions or load on that time what we saw on screenshot