<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi again,<br>
      <br>
      We are publishing messages in this tight loop just for testing
      purposes and simulate scenarios with several publishers per
      second. <br>
      <br>
      But I don't understand why this problem is happening with the ampq
      interface, but with stomp interface and the same loop, it doesn't
      occur:<br>
      <br>
      <small>&nbsp;while true do<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; client.publish "queue0",
        message,{'amq-msg-type'=&gt;'text',
        'type'=&gt;'content',:persistent =&gt; true)}<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; progress(1)&nbsp;&nbsp;&nbsp; <br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sleep(0.000000000001)&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
        end</small><br>
      <br>
      <br>
      Maybe the stomp interface works in another way different to the
      amqp one (with eventmachine, etc.)<br>
      <br>
      Cheers,<br>
      <br>
      Pablo<br>
      <br>
      El 11/09/13 13:07, Michael Klishin escribi&oacute;:<br>
    </div>
    <blockquote
      cite="mid:4D1976E4-1C39-4EB3-8B3F-F0B1CFBC41FC@rabbitmq.com"
      type="cite">
      <pre wrap="">Pablo Briongos:

</pre>
      <blockquote type="cite">
        <pre wrap="">The Ruby app process makes the crash of the machine as it increases the RAM and SWAP memory very fast to the limit.
</pre>
      </blockquote>
      <pre wrap="">
That's expected. With periodic timer set to 0, you have an infinite loop in your app that allocates
memory (first when you publish, then when a message is delivered). CRuby VM will *not*
release memory once it's allocated (only reuse it after GC marks it as free). With an infinite
loop, you allocate faster than GC kicks in and does its work, so at some point OS starts
swapping, and then you run out of memory.

Why do you need to publish messages in a tight loop?

</pre>
      <blockquote type="cite">
        <pre wrap="">I can't see any clear messages in log about it. I setted high watermark with:

sudo rabbitmqctl set_vm_memory_high_watermark 0.9
</pre>
      </blockquote>
      <pre wrap="">
Well, if the Ruby app crashes, RabbitMQ does not know anything about it.

MK



</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rabbitmq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>
<a class="moz-txt-link-freetext" href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>