[erlang-questions] Why Beam.smp crashes when memory is over?
Tue Nov 10 13:04:48 CET 2009
What kind of flavor do you have in mind?
One proposal is to let sender crash when receiver in box is full.
I would like to test a blocking version as well. This may sound like
crazy, but we already have the infamous busy_port ;-)
Busy ports do block senders (mostly distribution stuff).
An other flavor is to drop the overflow message. This can however be
by catch (Pid ! Message) if the crash semantics is implemented.
A suggestion from Patrik Winroth is to be able to set thresholds on
say in percent from max limit. When threshold is reached then a
is sent to a logger process.
The max_memory limit currently control number of words! that can be
allocated for heaps.
This is the sum of sizes of all heaps for the process and it's "sub"-
(spawned by process that had the limit set in the first place). It is
if the message queue and/or the messages them selfs are located on the
In the case where messages are none shared and located on a separate
this should be accounted for.
On 10 nov 2009, at 12.18, Chandru wrote:
> 2009/11/9 Tony Rogvall <>
>> Interesting discussion!
>> I have been working on a resource system for Erlang for nearly two
>> I have a working (tm) prototype where you can set resource limits
>> max_processes/max_ports/max_memory/max_time/max_reductions ...
> You don't happen to have a max_message_q_size option do you? Or does
> max_memory implicitly enforce this?
More information about the erlang-questions