[asterisk-dev] Asterisk gets killed by OS due to memory consumption

Simon Perreault simon.perreault at viagenie.ca
Thu Mar 31 10:57:09 CDT 2011


Klaus Darilion wrote, on 03/31/2011 05:38 PM:
> I think Asterisk gets killed be Linux due to its memory consumption and due to
> memory overloading (OOM). My settings are:
> 
> sysctl -a|grep commit
> vm.overcommit_memory = 0

As long as memory overcommit is enabled (values 0 or 1), Asterisk MAY die. There
is nothing Asterisk can do about it. The OOM killer may even pick Asterisk when
another program is responsible for the OOM condition. Deal with it.

If memory overcommit is disabled (value 2), Asterisk can avoid dying if it is
programmed correctly. The project's policy seems to be that code has to handle
memory allocation errors, so in theory Asterisk should be OK.

But all that is irrelevant. The best current practice is to monitor your
Asterisk, and to be prepared in case it dies. This is for a number of reasons in
addition to running out of memory.

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca



More information about the asterisk-dev mailing list