[Asterisk-Users] Memory leak in asterisk CVS

Walter Klomp walter at aglow.com.sg
Sat Jul 16 09:09:34 MST 2005


Hi,

My Asterisk CVS is apparently not doing much (other than keeping SIP & 
IAX2 registrations alive and doing some ZAP calls (without 
echo-cancellation), but slowly the memory is filling up, so much so that 
100m virtual memory is used up within 12 hours and I have to restart the 
asterisk application every 48 hours to make sure I have enough memory...

How can I help resolve this problem?

Problem occurs on both Sangoma and Digium installed systems. Fedora Core 
3 and Centos 4.1 don't make a difference either.

My version is Asterisk CVS-HEAD built on a i686 running Linux on 
2005-07-11 16:29:02

I have removed the mailbox entries in my sip.conf which greatly reduced 
this problem. So, I suspect it may be in the sip or iax channel application.

I also run quite a bit of agi scripts but none of them were "alive" when 
these memory-usage increases as shown below over a 1 minute interval 
with only 4 zap channels alive (2 calls) occured:

ps -AF output... using this script:
n=1;while [ 1 ]; do i=`ps -AF|grep ast|grep sbin|grep -v grep`; m=`echo 
$i|cut -f 6 -d\ `;if [ `echo $m` -ne `echo $n` ]; then echo $i; n=`echo 
$m`;fi;done

root 15875 26881 0 15727 46240 0 10:01 ? 00:00:00 /usr/sbin/asterisk -fp
root 15875 26881 0 15725 46248 0 10:01 ? 00:00:00 /usr/sbin/asterisk -fp
root 15875 26881 0 15725 46256 0 10:01 ? 00:00:00 /usr/sbin/asterisk -fp
root 15875 26881 0 15725 46268 0 10:01 ? 00:00:00 /usr/sbin/asterisk -fp
root 15875 26881 0 15725 46280 0 10:01 ? 00:00:00 /usr/sbin/asterisk -fp
root 15875 26881 0 15725 46288 0 10:01 ? 00:00:00 /usr/sbin/asterisk -fp

Hope we can fix this somehow.

Walter Klomp
Singapore.
 




More information about the asterisk-users mailing list