Summary:ASTERISK-00190: Asterisk Memory Leak?
Reporter:casey0999 (casey0999)Labels:
Date Opened:2003-08-28 12:32:57Date Closed:2011-06-07 14:10:32
Versions:Frequency of
Description:I am running a high-volume 4-E1 IVR system, with a very simple dialplan:  Answer, Play, Hangup.  I have CDR logging enabled via mySQL.  The "Play" is of a 3-second raw PCM message (uLaw format).
Although I have lots of memory, I notice that the memory in use (as shown by "free" and "top") increases fairly rapidly as my application is running over time.  For example, this morning the system handled about 18000 calls, and the Used memory increased from 262MB to 308MB in a one hour period.  I have to reboot my system periodically to recover memory, or swapping starts occurring.  I will investigate further to see if it's the "Play", or CDR logging which is creating this likely memory leak.
Comments:By: James Golovich (jamesgolovich) 2003-08-28 13:15:43

I've found the best way to debug memory leaks in asterisk is by using the built in memory debugger that can be enabled.

To enable it edit the Makefile in the asterisk src dir, and change the following line:
MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h
MALLOC_DEBUG = -include $(PWD)/include/asterisk/astmm.h

Then make sure to 'make clean' and recompile asterisk.

Once thats happened you can use the commands 'show memory summary' and 'show memoery allocations <filename>' to help track down the leak.

valgrind has also been very useful in tracking down leaks

By: Mark Spencer (markster) 2003-08-29 14:25:57

Can you provide any more diagnostic using either valgrind or this method for tracking down the memory leak?

By: John Todd (jtodd) 2003-09-29 03:19:21

Is this still evident?  Better data is required to solve the problem.

By: Brian West (bkw918) 2003-11-22 16:06:31.000-0600

Can you provide more feedback?  This bug seems stale.

By: Brian West (bkw918) 2003-11-23 07:57:27.000-0600

User seems to have disappeared.