[asterisk-dev] iax2-parser.c - Memory

Eric Dantie edantie at gmail.com
Fri Jul 25 09:24:50 CDT 2008


On Fri, 2008-07-25 at 07:06 -0500, Russell Bryant wrote:
> Eric Dantie wrote:
> > I'm using asterisk-1.4.21.1 in production and more or less after a week
> > of intensive use (more or less 200.000 calls) the system stop working
> > because of lack of memory.
> > 
> > After investigating the possibles causes, I found that the problem is in
> > channel/iax_parser.c. If compiled with MALLOC_DEBUG, memory show summary
> > is showing more and more memory used. The code looks good.
> > 
> > Solution found:
> > - Compiling with LOW_MEMORY so that unused blocks are really freed.
> > 
> > Problem compiling with LOW_MEMORY: if asterisk is using dundi, then
> > asterisk crash (http://bugs.digium.com/view.php?id=13154)
> > 
> > Hope that help someone with same problems.
> 
> Some amount of memory consumption in that code is expected, as it tries 
> to maintain a cache of unused frames for optimization purposes.  How 
> much memory is it consuming when it becomes a problem for you?
> 

The cache is growing till more or less 3GB of RAM, and then start to
complain for the lack of memory (the server has only 4GB of RAM, 32
bits).

I think it goes out of normal use of memory for an only max 120
simultaneous calls (2 E1).






More information about the asterisk-dev mailing list