<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Matthias,</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">This is rabbit.log after starting the server:</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">=INFO REPORT==== 26-Jan-2010::16:09:34 ===</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Memory limit set to 1634MB.</font></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">=INFO REPORT==== 26-Jan-2010::16:09:34 ===</span></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Rolling persister log to &quot;c:/AMQP/RabbitMQ/rabbitmq_server-1.7.0/db/rabbit-mnesi</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">a/rabbit_persister.LOG.previous&quot;</font></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">=INFO REPORT==== 26-Jan-2010::16:09:35 ===</span></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">started TCP Listener on <a href="http://0.0.0.0:5672">0.0.0.0:5672</a></font></div><div>__________________</div><div>These are the parameters, which I hope match what you mean:</div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">java -server ^</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">com.rabbitmq.examples.MulticastMain ^</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">-hlocalhost -p5672 -tdirect -eex1 -i10 -m1024 ^</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">-n1024 -q20 -s1000 -x1 -y1</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><div>here we go at 16:19:47.60 2010-01-26</div><div>
starting consumer #0</div><div>starting producer #0</div><div>sending rate: 10376 msg/s</div><div>sending rate: 10506 msg/s</div><div>sending rate: 10141 msg/s</div><div>sending rate: 9718 msg/s</div><div>sending rate: 8954 msg/s</div>
<div>Exception in thread &quot;Thread-3&quot; java.lang.RuntimeException: java.io.IOException</div><div>�� � � �at com.rabbitmq.examples.MulticastMain$Producer.run(MulticastMain.java:255)</div><div>�� � � �at java.lang.Thread.run(Unknown Source)</div>
<div>Caused by: java.io.IOException</div><div>�� � � �at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:121)</div><div>�� � � �at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:139)</div><div>
�� � � �at com.rabbitmq.client.impl.ChannelN.txCommit(ChannelN.java:689)</div><div>�� � � �at com.rabbitmq.client.impl.ChannelN.txCommit(ChannelN.java:70)</div><div>�� � � �at com.rabbitmq.examples.MulticastMain$Producer.run(MulticastMain.java:249)</div>
</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">all done at 16:21:17.15 2010-01-26</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; "><br></span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">The good news is that it crashes very quickly now, so I do not need to wait long;)</span></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Which is less than before. The dump is not that big, so I have attached a ZIPped version:�</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"></font><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">687,358 erl_crash.dump.</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">First few lines of the dump (the amount of memory being allocated is a good bit less than in the last crashes)</font>:</div>
<div><br></div><div>Slogan: eheap_alloc: Cannot allocate 298930300 bytes of memory (of type &quot;heap&quot;).</div><div>System version: Erlang R13B03 (erts-5.7.4) [smp:2:2] [rq:2] [async-threads:30]</div><div>Compiled: Tue Nov 24 11:12:28 2009</div>
<div><br></div><div>Cheers, John</div></font></div><div class="gmail_quote">_____________________________________________</div><div class="gmail_quote">On Mon, Jan 25, 2010 at 20:18, Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@lshift.net">matthias@lshift.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">John,<div class="im"><br>
<br>
John Apps wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have installed 1.7.1 in a new directory, recompiled the Java client and tried this test again.<br>
<br>
This is the contents of rabbitmq.config<br>
[<br>
 �{rabbit, [{vm_memory_high_watermark, 3}]},<br>
 �{rabbit, [{memory_alarms, true}]},<br>
 �{mnesia, [{dump_log_write_threshold, 1000}]},<br>
 �{rabbit, []}<br>
].<br>
I have tried various options with the above vm_memory_high_watermark, e.g., .4, .6 and so forth, the 3 above being from the last try. Perhaps there more options that I missed? It would not surprise me.<br>
</blockquote>
<br></div>
&quot;3&quot; would mean 300% of system memory, which is probably not what you want. I&#39;d stick with the default of &quot;0.4&quot; or lower. I also recommend checking what limit is being set by looking in the rabbit.log file for the line &quot;Memory limit is set to ...&quot;, and to watch out for any memory related log messages in general while running your tests.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Running the MulticastMain (Java) test against RabbitMQ with the parameters shown, leads to an Erlang crash after some time.<br>
The data below is from a Windows 7 X64 machine running JDK 6 X64.<br>
<br>
&quot;Cannot allocate 467078560 bytes&quot; is the error message.<br>
<br>
C:\AMQP\RabbitMQ\rabbitmq-java-client-1.7.1\test\src&gt;java -server ^<br>
com.rabbitmq.examples.MulticastMain ^<br>
-hlocalhost -p5672 -tdirect -eex1 -i10 -m1024 ^<br>
-n1024 -q20 -r1000 -s100 -x1 -y1<br>
</blockquote>
<br></div>
That actually exposes an area of uncertainty in the AMQP spec: At what point do transactional acks affect qos? At the time the ack is received by the server, or at the time the commit is received? RabbitMQ currently takes the latter view, which means with the above settings the consumer will not receive more than 20 messages. I have filed a bug to figure out whether that&#39;s the correct answer.<br>

<br>
Anyway, let that not distract us from figuring out why rabbit runs out of memory for you... I tried a slightly modified version of the above, removing the rate limit and increasing the size to 1000, in order to put the server under memory pressure sooner (since at a rate limit of 1000 and a message size of 100 it would have take several hours). That did cause the memory alarms to go off and the producer to be throttled. What do you see on your machine when running with these settings?<br>

<br>
<br>
Regards,<br><font color="#888888">
<br>
Matthias.<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>---<br>John Apps<br>(49) 171 869 1813<br>Sent from Traunstein, Bavaria, Germany