El 10 de junio de 2010 08:26, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com">simon@rabbitmq.com</a>></span> escribió:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 09/06/10 22:27, Nicolás César wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
(rabbit@sendsorium)1> memory().<br>
[{total,27420688},<br>
</blockquote></div>
<snip><div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
but in top I see beam.smp using:<br>
VIRT=141m RES=95m<br>
</blockquote>
<br></div>
So there is some disparity here but not as much as when you were seeing 400M used. I take it this was a different run?</blockquote><div><br><br>Yess... the OOM assassin was with his gun killing my processes! Rabbit went down fist! Thanks to you I have the memory(). trick for the next time. <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* Are you stopping the queues from hibernating? If you've written<br>
something like a shell script to repeatedly invoke rabbitmqctl<br>
list_queues this will keep the queue processes from hibernating<br>
which in turn stops them from GCing on hibernate. If queues are busy<br>
this is not a problem as they also GC every (n) reductions, but if<br>
they're almost-but-not-quite idle it can be a problem. It doesn't<br>
have to be a shell script, anything that means the queues never get<br>
10 seconds or so idle.<br>
<br>
<br>
This is really nice data!! Yes. I have scripts but they're cron'ed every<br>
minute.... I'm changing that and testing again.<br>
</blockquote>
<br></div>
Every minute *should* be OK, it's more like every couple of seconds which can prevent the hibernation.</blockquote><div class="im"><br>I've changed it to 10 minutes and there were no significant behavior changes. <br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
One small detail. I'm using:<br>
<br>
-----------------------------------------------------<br>
while True:<br>
msg = self.chan.basic_get(self.config['queue'])<br>
if msg:<br>
....<br>
time.sleep(2.0)<br>
----------------------------------------------------<br>
<br>
because I need a fixed-rate consumer . ... could this be a similar case<br>
of the "almost-but-not-quite idle queue"?<br>
</blockquote>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes, as you'll still be waking the queue up every 2 seconds even if it's empty. I suspect this is your real problem.</blockquote><div><br>Bingo! thanks Simon for your help in this issue!! now it's on the mail archive, I hope this mail helps next googling rabbiter. :)<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
is there any way to tell the broker to consume at a fixed rate with<br>
chan.basic_consume(...callback = f)?<br>
</blockquote>
<br></div>
Yes, basic.qos. This not-very-well-named method lets you specify how many unacked messages the server will send to you at any time. So set qos to a low value, then use basic_consume with a sleep before acking.<br></blockquote>
<div><br>Nice to hear a yes here!! I'll be changing my code to get this working! Thanks! <br><br>Nico Cesar<br></div></div>