bar top left
bar top right
left curve
right curve
Welcome, Guest
Go to bottom
Post Reply
Post New Topic
Page: 12
TOPIC: Memory Leak related to chan_iax2
#77350
Memory Leak related to chan_iax2 1 Year ago Karma: 0
I have two identical 2.0.4 beta installs of Elastix. (I got the same problem with 2.0.3 release too)

One has only 3 IAX2 extensions to serve IAX faxes, the other has 91 IAX2 extensions to serve faxes.

The hardware is identical on both, Pentium 4, 2GB RAM, Sangoma A101D T1 card.

Asterisk runs out of memory with this error on the machine with the 91 IAX2 extensions:


[May 1 06:45:01] VERBOSE[3009] asterisk.c: -- Remote UNIX connection
[May 1 06:45:01] VERBOSE[8304] asterisk.c: -- Remote UNIX connection disconnected
[May 1 06:50:01] ERROR[3009] asterisk.c: Unable to spawn thread to handle connection: Cannot allocate memory
[May 1 06:55:01] ERROR[3009] asterisk.c: Unable to spawn thread to handle connection: Cannot allocate memory
[May 1 07:00:01] ERROR[3009] asterisk.c: Unable to spawn thread to handle connection: Cannot allocate memory

Some googling around has shown me that others noticed this too and there apparently is no resolution as of yet.

I did some checking and with zero activity, the VSZ column from ps -aux climbs from 150M to 210M in about 1 hour and keeps climbing during the entire time of zero activity. No calls, no faxes.

asterisk 14378 0.1 1.8 219876 37420 ? Sl 17:40 0:11 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c

For now, I am using a cron job to restart the asterisk service each morning at 3am.

Is there a resolution for the memory leak problem with iax2?

If on an Elastix server with just 2 or 3 IAX2 modems, will the same memory allocate error occur, just take longer?

Thanks.

Versions below:

Kernel
Linux(i386)-2.6.18-194.26.1.el5

Elastix
elastix-2.0.4-18
elastix-my_extension-2.0.4-5
elastix-email_admin-2.0.4-12
elastix-a2billing-1.8.1-15
elastix-system-2.0.4-10
elastix-fax-2.0.4-5
elastix-firstboot-2.0.4-7
elastix-pbx-2.0.4-19
elastix-security-2.0.4-11
elastix-vtigercrm-5.1.0-8
elastix-reports-2.0.4-9
elastix-im-2.0.4-1
elastix-asterisk-sounds-1.2.3-1
elastix-agenda-2.0.4-7
elastix-addons-2.0.4-6
elastix-extras-2.0.4-3

RounCubeMail
RoundCubeMail-0.3.1-9

Mail
postfix-2.3.3-2.1.el5_2
cyrus-imapd-2.3.7-7.el5_4.3

IM
openfire-3.5.1-2

FreePBX
freePBX-2.8.0-2

Asterisk
asterisk-1.6.2.16.1-1
asterisk-perl-0.10-2
asterisk-addons-1.6.2.2-0

FAX
hylafax-4.3.9-0rhel5
iaxmodem-1.2.0-1.1

DRIVERS
dahdi-2.4.0-1
rhino-0.99.4-0.rc1
wanpipe-util-3.5.18-1
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
itcoresys
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#78348
Re: Memory Leak related to chan_iax2 1 Year ago Karma: 0
I'm having the same issue on a system with 9 IAX2 extensions for faxing going to hylafax.
Takes about 70 days before it crashes.

Any resolution?

Thanks
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
sababa
Junior Boarder
Posts: 63
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#78450
Re:Memory Leak related to chan_iax2 1 Year ago Karma: 112
Meanwhile try the cron work-around to stop & start asterisk at a given time where it is not in use
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
jgutierrez
Moderator
Posts: 3566
graphgraph
User Offline Click here to see the profile of this user
Gender: Male jgutierr_007@hotmail.com Location: Santiago de Guayaquil - Ecuador Birthday: 08/07
Last Edit: 2011/05/17 09:45 By jgutierrez.
Do you want a fast response service?
Do you want more help?
Try our Official Elastix Paid Support Service(English/Español):
support.palosanto.com/elastixChatServer.php

Get your support tickets from:
store.palosanto.com


Soporte Elastix Palosanto Solutions
Santiago de Guayaquil
Reply Quote
 
#78518
Re:Memory Leak related to chan_iax2 1 Year ago Karma: 0
Way ahead of ya.

Im doing a 3am service asterisk reload command each day.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
itcoresys
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#81274
Re:Memory Leak related to chan_iax2 10 Months, 3 Weeks ago Karma: 0
hi .i'm have elastix 2.03.80 extentsion iax2 to fax.have crash asterisk service
every 22 hours.Cannot allocate memory in log.
and other server 2.03 14 extentsion to fax crash every 7 day.
i'm solve problem with install asterisk 1.6.1.25. not tested to other problems.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
revlin
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/07/03 04:26 By revlin.
Reply Quote
 
#81547
Re:Memory Leak related to chan_iax2 10 Months, 2 Weeks ago Karma: 1
Hi I am having the same problem on a box with ~40 sip extensions and ~20 iax faxmodems.
I am not sure however if this is due to IAX or SIP. Its a production box with about ~1k calls per day.

Links hidden for unregistered users. Login or register Here

Links hidden for unregistered users. Login or register Here

It is stated that this is fixed on asterisk 1.6.2.17.
Any ideas/news/experience?

Best regards,

Ioannis
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
ikamp
Fresh Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#82606
Re:Memory Leak related to chan_iax2 9 Months, 3 Weeks ago Karma: 1
Hi,

I investigated the problem and found out that this was due to chan_iax.
The memory leak has to do with iax peers registrations.
So what I did was to set iaxmodems static IP and port, set refresh from 300 to 0 on each iaxmodem-cfg.ttyIAX?.

Best regards,

Ioannis
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
ikamp
Fresh Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#83002
Re:Memory Leak related to chan_iax2 9 Months, 2 Weeks ago Karma: 0
Hi
Are you sure if i set refresh time to 0 , problem will solve???
and how can i set iaxmodems static IP and port ?? because when i set Refresh from 300 to 0 , that IAX Extension is not register and that fax related to the IAX Extension doesn't work

Thanks
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
payamkh59
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#83005
Re:Memory Leak related to chan_iax2 9 Months, 2 Weeks ago Karma: 1
In /etc/iaxmodem you will find the .cfg file for each one of the modems (i.e. iaxmodem-cfg.ttyIAX1 ).
If you check the contents you will find something like:
Code:


device          /dev/ttyIAX1
owner           uucp:uucp
mode            660
port            40000
refresh         0
server          127.0.0.1
peername        4101
secret          xxxxxxxxx
cidname         xxxxxxxxxxxxxxxxxx
cidnumber       xxxxxxxxxxxxx
codec           slinear



So you know the port for each iaxmodem (peername=extension, port=port).
The IP is always 127.0.0.1
In elastix just set
host: 127.0.0.1 (instead of dynamic)
port: what is written in the corresponding /etc/iaxmodem-cfg.ttyIAX?)
and qualify no.

Then set refresh to zero. That should do the trick.

Best regards,

Giannis
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
ikamp
Fresh Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#83019
Re:Memory Leak related to chan_iax2 9 Months, 2 Weeks ago Karma: 0
Hi
Thanks for your answer
I wanna know instead of these things , if i change refresh time for groups of iaxmodem , the problem will solve or not ?
For example if i have 20 iaxmodem for half of them set refresh time to 100 and for others set refresh time to 300 (no changes) , as a result all of iaxmodem don't register at a same time and memory leak doesn't happen .
Is this solution practical or not?

Thanks
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
payamkh59
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 12
Moderators: Bob, jgutierrez
Protected by Spam Fighter