[zeromq-dev] Handling OOM

Pieter Hintjens ph at imatix.com
Wed May 18 15:58:45 CEST 2011

On Wed, May 18, 2011 at 3:47 PM, Ilja Golshtein <ilejncs at narod.ru> wrote:
> 18.05.2011, 14:03, "Pieter Hintjens" <ph at imatix.com>:
>> I'd suggest anything over 1M can fail without indicating OOM.
> Just to make behaviour more predictable and simplify support team' life.

Hard to know if you're being cautiously supportive or gently ironic :)
 I'll assume irony and play my two of spades.

My personal preference for handling OOM is to die, rapidly, with a
message like "Raise your VM size and restart everything!". But clearly
asking to allocate a huge message can fail without signalling that
other stuff will also fail.

Since this allocation happens in exactly one place, zmq_msg_init_size,
it's trivial to return an error and if the application ignores that,


More information about the zeromq-dev mailing list