[asterisk-users] cannot allocate memory

Steve Edwards asterisk.org at sedwards.com
Wed Feb 25 13:00:50 CST 2009


On Wed, 25 Feb 2009, wassim Darwish wrote:

> i have a hosted server with asterisk and a2billing as a billing 
> plattform, when i am trying to enter the server remotely by ssh, memory 
> error message displayed: -bash: fork: Cannot allocate memory

This is not an Asterisk error message.

> i have 1GB RAM on the system ,and there is 15 to 25 concurrent calls on 
> the system is'nt 1GB of RAM sufficient for this volume of calls on 
> Asterisk.

Yes. Way more than sufficient.

> and when iam using "top" command this is what i get:
>
> top - 20:20:25 up 2:15, 1 user, load average: 0.57, 0.22, 0.13
> Tasks: 100 total, 1 running, 36 sleeping, 0 stopped, 63 zombie
> Cpu(s): 7.7% us, 2.3% sy, 0.0% ni, 90.0% id, 0.0% wa, 0.0% hi, 0.0% si,
> Mem: 1048576k total, 316088k used, 732488k free, 0k buffers
> Swap: 0k total, 0k used, 0k free, 0k cached
>
> As i see it that the free memory is 732488k ,so it should'nt make this error.

Personally, I'm not a big fan of zombies.

If this is what "top" displays while you are getting the error message on 
another shell, it is not a "free memory" issue. Maybe some other resource 
like file handles is being sucked up by your zombies and bash is 
misreporting the error.

Does the error "fix" itself or do you need to reboot the box?

Unrelated, but I would add a swap file just in case you need it at some 
point. While swapping is a somewhat bad thing, I prefer it to failing or 
locked processes.

Also, you didn't say what OS, OS version or Asterisk version you are 
running. Updating the OS (for CentOS, sudo yum update) and Asterisk may 
resolve your problem. If not, you will have a better chance finding a 
solution if you are running something reasonably current. (Says he who 
still runs 1.2...)

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list