[asterisk-bugs] [JIRA] (ASTERISK-28523) Asterisk 16.5.0 Memory leak

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Tue Sep 17 18:16:48 CDT 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248051#comment-248051 ] 

Kevin Harwell edited comment on ASTERISK-28523 at 9/17/19 6:15 PM:
-------------------------------------------------------------------

I disabled most modules from loading. See [^modules.conf]. The other _conf_ files were the base configs used for testing. I ran the test once with sorcery caching enabled, and then a second time after disabling caching (i.e. commented out the caching line):

[^extconfig.conf]
[^extensions.conf]
[^modules.conf]
[^pjsip.conf]
[^res_odbc.conf] (use your username/password here)
[^sorcery.conf]

Using a postgresql database I created the necessary tables using the Asterisk alembic scripts. I then inserted 2000 endpoints and associated data into the appropriate tables. I used the following files to easily insert the records:

[^endpoints.1000.sql]
[^endpoints.2000.sql]

I used something like the following command to do so:
{noformat}
$ psql -U your_db_user < endpoints.1000.sql
$ psql -U your_db_user < endpoints.2000.sql
{noformat}

Using the above configs, I started Asterisk, and then executed the attached SIPp scenarios to make calls through Asterisk. Start [^invite_recv.xml] first:
{noformat}
$ sipp 127.0.0.1 -p 5062 -aa -sf invite_recv.xml
{noformat}
Then I started [^invite.xml] next which initiates the calls. I let the scenarios run for around 10 minutes before stopping:
{noformat}
$ sipp 127.0.0.1 -p 5061 -sf invite.xml -inf invite.csv -aa -r 30
{noformat}


was (Author: kharwell):
I disabled most modules from loading. See [^modules.conf]. The other _conf_ files were the base configs used for testing. I ran the test once with sorcery caching enabled, and then a second time after disabling caching (i.e. commented out the caching line):

[^extconfig.conf]
[^extensions.conf]
[^modules.conf]
[^pjsip.conf]
[^res_odbc.conf] (use your username/password here)
[^sorcery.conf]

Using a postgresql database I created the necessary tables using the Asterisk alembic scripts. I then inserted 2000 endpoints and associated data into the appropriate tables. I used the following files to easily insert the records:

[^endpoints.1000.sql]
[^endpoints.2000.sql]

I used something like the following command to do so:
{noformat}
$ psql -U <your db user> < endpoints.1000.sql
$ psql -U <your db user> < endpoints.1000.sql
{noformat}

Using the above configs, I started Asterisk, and then executed the attached SIPp scenarios to make calls through Asterisk. Start [^invite_recv.xml] first:
{noformat}
$ sipp 127.0.0.1 -p 5062 -aa -sf invite_recv.xml
{noformat}
Then I started [^invite.xml] next which initiates the calls. I let the scenarios run for around 10 minutes before stopping:
{noformat}
$ sipp 127.0.0.1 -p 5061 -sf invite.xml -inf invite.csv -aa -r 30
{noformat}

> Asterisk 16.5.0 Memory leak
> ---------------------------
>
>                 Key: ASTERISK-28523
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28523
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 16.5.0
>         Environment: Ubuntu 16.04.6 LTS / AWS C5.* instance
>            Reporter: Cyril Ramière
>            Assignee: Cyril Ramière
>              Labels: pjsip, webrtc
>         Attachments: ast_ram_24h.PNG, ast_ram_up.PNG, ast_sorcery_cache_endpoints_2000vs500.PNG, config.zip, endpoints.1000.sql, endpoints.2000.sql, extconfig.conf, extensions.conf, invite.csv, invite_recv.xml, invite.xml, leak_caching.txt, leak_without_caching.txt, memory_show_allocations_24h.zip, memory_show_allocations.zip, memory_show_summary_24h.txt, memory_show_summary.txt, modules.conf, pjsip.conf, res_odbc.conf, sorcery.conf
>
>
> Hello everyone,
> I noticed that our asterisk are consuming big amounts of ram (could be more than 1.6Gb after some days/weeks depending on server load).
> We are using asterisk in realtime mode for all of our calls with MySQL (res_mysql).
> Everything is handled through the ARI interface (dialplan passes to Stasis) connected to our application.
> I attached the full configuration of our asterisk server, I just replaced sensitive information to not expose our passwords/endpoints.
> I'm currently running an instance with MALLOC_DEBUG & no optimize, it's been couple hours since I started my test and it is taking almost 300Mb for now (it will continue to grow).
> Here is the result of commands memory show.
> Best regards.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list