[asterisk-bugs] [JIRA] (ASTERISK-26505) Using res_odbc module for querying a longBLOB column causes a big memory usage

Leandro Dardini (JIRA) noreply at issues.asterisk.org
Tue Nov 1 05:23:10 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leandro Dardini updated ASTERISK-26505:
---------------------------------------

    Attachment: mmlog
                messages.issue26505.txt
                issue26505-strace-memory.txt
                issue26505-ps-predial.txt
                issue26505-ps-postdial.txt
                issue26505-memory_show_summary.txt
                issue26505-memory_show_allocations.gz
                full.issue26505.txt
                dtmf.issue26505.txt

Data created using 

strace -f -F -p 12741 -e trace=memory &>/tmp/issue26505-strace-memory.txt &  ps aux | grep "/usr/sbin/asterisk" | tee /tmp/issue26505-ps-predial.txt ; asterisk -rx 'logger add channel debug_log_26505 notice,warning,error,debug,verbose,dtmf'; asterisk -rx 'core set verbose 5'; asterisk -rx 'core set debug 5'; asterisk -rx 'module reload logger'; asterisk -rx 'logger rotate' ; asterisk -rx 'memory backtrace on' ; echo "Dial 9999" ; read  ; ps aux | grep "/usr/sbin/asterisk" | tee /tmp/issue26505-ps-postdial.txt ; asterisk -rx 'memory show summary' | tee /tmp/issue26505-memory_show_summary.txt ; asterisk -rx 'memory show allocations' | tee /tmp/issue26505-memory_show_allocations

> Using res_odbc module for querying a longBLOB column causes a big memory usage
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26505
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26505
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_odbc
>    Affects Versions: 13.2.0, 13.4.0, 13.11.2
>         Environment: CentOS 6.x 64 bit, Mysql 5.1
>            Reporter: Leandro Dardini
>            Assignee: Unassigned
>            Severity: Minor
>         Attachments: dtmf.issue26505.txt, full.issue26505.txt, issue26505-memory_show_allocations.gz, issue26505-memory_show_summary.txt, issue26505-ps-postdial.txt, issue26505-ps-predial.txt, issue26505-strace-memory.txt, messages.issue26505.txt, mmlog
>
>
> Please note I have listed the versions where I tried this. Not listed version were not tested.
> If I have a table with a longBLOB field (but probably it happens for any type of BLOB column) and I define in func_odbc.conf an entry like
> {noformat}
> [READ_EXTENSIONS]
> dsn=asterisk1,asterisk2
> synopsis=Retrieve the extension data
> readsql=SELECT * FROM ex_extensions where id='${ARG1}'
> {noformat}
> Using a function like
> {noformat}
> Set(HASH(phone)=${ODBC_READ_EXTENSIONS(56)});
> {noformat}
> The same command, using any other type of column, gives no problems at all.
> Determines an increase of virtual memory usage in Asterisk... I have seen it getting up to 30 GB on a medium sized server.
> When this abnormal memory usage happens, asterisk continue to work, but it cannot spawn external processes, like from res_agi.c:
> {noformat}
> [2016-10-26 10:04:18] WARNING[26880][C-000002bb] res_agi.c: Failed to fork(): Cannot allocate memory
> {noformat}



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



More information about the asterisk-bugs mailing list