[asterisk-dev] Realtime/MySQL limitation or Bug ?

Leif Madsen leif.madsen at asteriskdocs.org
Mon Oct 4 08:54:18 CDT 2010


On 10-10-04 12:41 AM, Tilghman Lesher wrote:
> On Sunday 03 October 2010 18:22:19 Matt Riddell wrote:
>> On 2/10/10 8:04 PM, Phibee Network Operation Center wrote:
>>> Do you know if the extension are limited when we use Realtime and MySQL ?
>>>
>>> I use Asterisk 1.6.1.4 with mysql 5.1.34 and when i use a table with
>>> 34000 entry into the table, Asterisk start, load but when a user want
>>> call, Asterisk crash
>>> without any error.
>>
>> Have you had a look at the backtrace?
>>
>> Compile with DONT_OPTIMIZE, make sure you're dumping core and then use
>> gdb to check why it crashed.
>
> If a large percentage of them are pattern matches, then it's likely that it
> crashed due to an out-of-memory condition.  The way that it currently works
> is to search for an exact match first, then if no results, it will load all
> pattern matches into memory in order to select the best match.  Because the
> search algorithm is not available in the database, it must do it this way.
> Additionally, MySQL operates in such a way that the process allocates memory
> for the entire resultset, before anything is even parsed.  This leads to
> an even larger memory footprint.

This is why I find the use of func_odbc with a static dialplan a much better 
method of loading in dynamic data rather than relying on the realtime 
implementation of extensions.

Leif.



More information about the asterisk-dev mailing list