iceblaze | 1 Jun 02:16 2012
Picon

Re: Net::RabbitMQ::get() fails with unexpected header?

Nevermind, the reason is that the documentation is missing the $options hash description for get(). To fix it, one needs to add { no_ack => 0 } if you're using transactions.

-James

On Wed, May 30, 2012 at 12:46 PM, iceblaze <iceblaze-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello,

I am attempting to run the function as follows:


                try {
                        $successful = 1;
                        $msg = $self->{_rabbit}->get($self->{_channel}, $self->{_queue});
                } catch {
                        $successful = 0;
                        $self->error_handler("get - $_");
                };

which should work, and this does work when i use recv(), but when I try to use get()


        F::Rabbit::__ANON__('Unexpected header 1! at F/Rabbit.pm line...') called at /usr/lib/perl5/site_perl/5.8.8/Try/Tiny.pm line 100

Does anyone know what the unexpected header could be, or how I can go about troubleshooting this?

Thanks!

-James

--
"Of course, the actual government of any computer is run by that fascist dictator known as the operating system. But a wise dictator knows when to let the people think they're capitalists--and when to let them think they're communists." - Programming Perl third edition



--
"Of course, the actual government of any computer is run by that fascist dictator known as the operating system. But a wise dictator knows when to let the people think they're capitalists--and when to let them think they're communists." - Programming Perl third edition
<div>
<p>Nevermind, the reason is that the documentation is missing the $options hash description for get(). To fix it, one needs to add { no_ack =&gt; 0 } if you're using transactions.<br><br>-James<br><br></p>
<div class="gmail_quote">
On Wed, May 30, 2012 at 12:46 PM, iceblaze <span dir="ltr">&lt;<a href="mailto:iceblaze@..." target="_blank">iceblaze@...</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
Hello,<br><br>I am attempting to run the function as follows:<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $successful = 1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $msg = $self-&gt;{_rabbit}-&gt;get($self-&gt;{_channel}, $self-&gt;{_queue});<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } catch {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $successful = 0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $self-&gt;error_handler("get - $_");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>which should work, and this does work when i use recv(), but when I try to use get() <br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; F::Rabbit::__ANON__('Unexpected header 1! at F/Rabbit.pm line...') called at /usr/lib/perl5/site_perl/5.8.8/Try/Tiny.pm line 100<br><br>Does anyone know what the unexpected header could be, or how I can go about troubleshooting this?<br><br>Thanks!<br><br>-James<span class="HOEnZb"><br clear="all"><br>-- <br>"Of course, the actual government of any computer is run by that fascist dictator known as the operating system. But a wise dictator knows when to let the people think they're capitalists--and when to let them think they're communists." - Programming Perl third edition<br></span>
</blockquote>
</div>
<br><br clear="all"><br>-- <br>"Of course, the actual government of any computer is run by that fascist dictator known as the operating system. But a wise dictator knows when to let the people think they're capitalists--and when to let them think they're communists." - Programming Perl third edition<br>
</div>
Alvaro Videla | 1 Jun 10:59 2012
Picon

New Open Source Project: Consumer Dispatcher

Hi,


The guys at my previous company The NetCircle just open sourced a project called "Consumer Dispatcher" which can be used to manage RabbitMQ consumers.

The "what" and "why" can be seen here:


Regards,

Alvaro
<div>
<p>Hi,</p>
<div><br></div>
<div>The guys at my previous company The NetCircle just open sourced a project called "Consumer Dispatcher" which can be used to manage RabbitMQ consumers.</div>
<div><br></div>
<div>The "what" and "why" can be seen here:</div>
<div><br></div>
<div><a href="https://github.com/jackyhung/consumer-dispatcher/wiki/What-is-Consumer-Dispatcher-and-Why">https://github.com/jackyhung/consumer-dispatcher/wiki/What-is-Consumer-Dispatcher-and-Why</a></div>
<div>
<br>
</div>
<div>Regards,</div>
<div><br></div>
<div>Alvaro</div>
</div>
Cloud DNS | 1 Jun 11:10 2012

check queue's content

Hi,

Is there such a tool to check the content of queues?

thanks

Matthias Radestock | 1 Jun 11:53 2012

Re: Throttling messages sent out upon reconnect

Greg,

On 28/05/12 14:28, Greg Rice wrote:
> I'm using the Bunny AMQP library to publish messages to a queue
> cluster. If the cluster goes down, or the network drops out, messages
> spool up on the publisher side. When network connectivity is restored,
> those spooled messages all go out at once, hiking up CPU load on the
> publisher's end.

What buffers the messages? The app? Bunny? The kernel?

> I'd like to throttle publishing so that even on reconnect, publishing
> doesn't exceed a certain rate of messages per second. Either that, or,
> less ideally, I'd like to limit the amount of messages spooled so that
> no more than, say, 100 messages can back up while the network is down.

The CPU hike surely should last only a fraction of a second, given that 
a rabbit client ought to be able to publish messages at a rate of tens 
of kHz.

> Where should I be looking for a solution to this problem?

You'd either have to patch Bunny or the app, depending on where the 
buffering occurs.

Matthias.
Simon MacMullen | 1 Jun 11:57 2012

Re: check queue's content

On 01/06/12 10:10, Cloud DNS wrote:
> Is there such a tool to check the content of queues?

There's nothing that allows you to look inside a queue without touching it.

The management plugin lets you view messages from a queue; but it does 
this by consuming them in ack mode then closing the connection - so all 
such messages get their redelivered flag set. (And if another process is 
consuming from the queue at the time, things may get reordered.)

Cheers, Simon

--

-- 
Simon MacMullen
RabbitMQ, VMware
Matthias Radestock | 1 Jun 12:02 2012

Re: Rabbit MQ memory is continuously growing up

On 30/05/12 12:06, Jagadeeshwar Gunda wrote:
> I am using erl5.9 and rabbitmq_server-2.7.1 verstions with Spring
> AMQP(java client)
>
> Below i am attaching my configuration and producer and consumer handler
> classes

As Simon asked previously, *what* is growing in memory and eventually 
crashing? The client/app or the RabbitMQ server? If it's the former I 
suggest you use one the Java memory profilers to figure out where the 
memory is going.

Regards,

Matthias.
Cloud DNS | 1 Jun 12:26 2012

Re: check queue's content

于 2012-6-1 17:57, Simon MacMullen 写道:
> The management plugin lets you view messages from a queue; but it does 
> this by consuming them in ack mode then closing the connection - so 
> all such messages get their redelivered flag set. (And if another 
> process is consuming from the queue at the time, things may get 
> reordered.) 

that sounds a smart way for checking the queues.
thank you.

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss <at> lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Andrei Vereha | 1 Jun 12:44 2012
Picon

Rabbitmq 2.8.2 crash using node-amqp client

Hello,

Rabbitmq is crashing with one of these messages:
Slogan: binary_alloc: Cannot allocate 245000040 bytes of memory (of type
"binary"). 
in /var/lib/rabbitmq/erl_crash.dump
or killed by OOM killer:
Out of memory: Kill process 29165 (beam) score 889 or sacrifice child

I attached the script I used to stress it with. If it doesn't crash,
try to start 2 instances of this script. The script is wrote in node.js
and uses the node-amqp library.

If you need details don't hesitate to contact me.

Thank you,
  Andrei Vereha
Attachment (crash.js): application/javascript, 576 bytes
Hello,

Rabbitmq is crashing with one of these messages:
Slogan: binary_alloc: Cannot allocate 245000040 bytes of memory (of type
"binary"). 
in /var/lib/rabbitmq/erl_crash.dump
or killed by OOM killer:
Out of memory: Kill process 29165 (beam) score 889 or sacrifice child

I attached the script I used to stress it with. If it doesn't crash,
try to start 2 instances of this script. The script is wrote in node.js
and uses the node-amqp library.

If you need details don't hesitate to contact me.

Thank you,
  Andrei Vereha
Tim Watson | 1 Jun 12:45 2012

Re: Rabbitmq 2.8.2 crash using node-amqp client

On 01/06/12 11:44, Andrei Vereha wrote:
Hello, Rabbitmq is crashing with one of these messages: Slogan: binary_alloc: Cannot allocate 245000040 bytes of memory (of type "binary"). in /var/lib/rabbitmq/erl_crash.dump or killed by OOM killer: Out of memory: Kill process 29165 (beam) score 889 or sacrifice child I attached the script I used to stress it with. If it doesn't crash, try to start 2 instances of this script. The script is wrote in node.js and uses the node-amqp library.
Well it *is* possible to crash the vm by exhausting all available memory and/or triggering the OOM Killer on Linux. Take a read of http://www.rabbitmq.com/memory.html for more details on how to manage this.

If you need details don't hesitate to contact me. Thank you, Andrei Vereha

_______________________________________________ rabbitmq-discuss mailing list rabbitmq-discuss-ETbvJ2rUIr4qBm01orBoR9BPR1lH4CV8@public.gmane.org https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

<div>
    On 01/06/12 11:44, Andrei Vereha wrote:
    <blockquote cite="mid:20120601134436.73a7a7d2@..." type="cite">
      Hello,

Rabbitmq is crashing with one of these messages:
Slogan: binary_alloc: Cannot allocate 245000040 bytes of memory (of type
"binary"). 
in /var/lib/rabbitmq/erl_crash.dump
or killed by OOM killer:
Out of memory: Kill process 29165 (beam) score 889 or sacrifice child

I attached the script I used to stress it with. If it doesn't crash,
try to start 2 instances of this script. The script is wrote in node.js
and uses the node-amqp library.
    </blockquote>
    Well it *is* possible to crash the vm by exhausting all available
    memory and/or triggering the OOM Killer on Linux. Take a read of
    <a class="moz-txt-link-freetext" href="http://www.rabbitmq.com/memory.html">http://www.rabbitmq.com/memory.html</a> for more details on how to
    manage this.<br><br><blockquote cite="mid:20120601134436.73a7a7d2@..." type="cite">

If you need details don't hesitate to contact me.

Thank you,
  Andrei Vereha

      <br><br>_______________________________________________
rabbitmq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rabbitmq-discuss@...">rabbitmq-discuss@...</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>

    </blockquote>
    <br>
</div>
Andrei Vereha | 1 Jun 13:20 2012
Picon

Re: Rabbitmq 2.8.2 crash using node-amqp client

On Fri, 01 Jun 2012 11:45:39 +0100
Tim Watson <tim@...> wrote:

> On 01/06/12 11:44, Andrei Vereha wrote:
> > Hello,
> >
> > Rabbitmq is crashing with one of these messages:
> > Slogan: binary_alloc: Cannot allocate 245000040 bytes of memory (of
> > type "binary").
> > in /var/lib/rabbitmq/erl_crash.dump
> > or killed by OOM killer:
> > Out of memory: Kill process 29165 (beam) score 889 or sacrifice
> > child
> >
> > I attached the script I used to stress it with. If it doesn't crash,
> > try to start 2 instances of this script. The script is wrote in
> > node.js and uses the node-amqp library.
> Well it *is* possible to crash the vm by exhausting all available
> memory and/or triggering the OOM Killer on Linux. Take a read of 
> http://www.rabbitmq.com/memory.html for more details on how to manage
> this.

I read the page above, and it seems that the vm_memory_high_watermark
has no effect in this case.
Configuration:

[{rabbit, [{vm_memory_high_watermark, 0.2}]}].

The log file says:

=INFO REPORT==== 1-Jun-2012::14:01:45 ===
vm_memory_high_watermark set. Memory used:105251880 allowed:103223296

=INFO REPORT==== 1-Jun-2012::14:01:45 ===
    alarm_handler:
{set,{{resource_limit,memory,'rabbit <at> rabbitmq-03'},[]}}

When I look into the management interface the connections are in
"running" state, though the memory alarm is triggered(the memory
section is red in the overview interface). And the memory usage is just
growing. 

When I try to send a big message from python using Pika, I cannot
reproduce the crash. That's why I attached the example client in
node.js.

Thank you,
 Andrei


Gmane